Hypervisor Context Switching via Redirection Exception Vector

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Hypervisors face performance challenges during context switches due to inefficient management of page tables, exception vectors, address space identifiers, and virtual machine identifiers across multiple hierarchical privilege levels in computer systems, particularly in architectures like ARMv7 and ARMv8, which require optimized resource allocation and management strategies.

Innovation Solution

The proposed solution involves assigning hypervisor components to specific privilege levels, utilizing trampolines and translation lookaside buffer tags to streamline context switches, and employing redirection exception vectors to optimize execution control transitions between components, thereby reducing overhead and improving performance by reusing content and minimizing time-consuming operations like TLB flushes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If context switching is performed between hypervisor components across multiple privilege levels, then execution control can be transferred between components, but the complexity of managing page tables, exception vectors, and TLB entries increases significantly

Engineering Contradiction:
Improvecontext switching capabilityVSAvoidmanagement complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent segments the context switching process into distinct phases: identifying the need for context switch, switching privilege levels, updating exception vectors, and managing TLB entries. Each phase is handled independently with specific instructions, reducing the overall complexity by breaking down the monolithic context switch operation into manageable segments.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces intermediary data structures and mechanisms to manage the complexity of context switching across privilege levels. Exception vectors act as intermediaries that redirect execution between different privilege levels, while page table entries and TLB tags serve as intermediaries to manage memory translation across context switches without requiring complete system state changes.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If traditional context switching methods are used across multiple privilege levels, then execution control can be transferred, but performance is degraded due to time-consuming operations like TLB flushes

Engineering Contradiction:
Improvecontext switch speedVSAvoidtime for TLB flushes
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent performs preliminary actions by pre-configuring exception vectors and page table entries before context switches are needed. TLB tags are pre-updated with new virtual machine identifiers, and exception vector tables are pre-populated with correct entry points for different privilege levels. This eliminates the need for time-consuming TLB flushes during actual context switches, as the translation cache is already prepared.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent changes key parameters during context switching by updating only the necessary TLB tags with new virtual machine identifiers rather than flushing the entire TLB. Exception vector registers are updated with new address values to point to the correct privilege level handlers. These selective parameter changes maintain performance by minimizing the scope of modifications required during context switches.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If exception vectors are updated during context switches across privilege levels, then correct execution flow is achieved, but the overhead of managing multiple exception vector tables increases

Engineering Contradiction:
Improveexecution flow accuracyVSAvoidexception vector management
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent implements a universal exception vector management mechanism that serves multiple privilege levels through a single coordinated system. The same exception vector update logic is applied across different privilege levels, and a unified exception handling framework manages faults, interrupts, and system calls regardless of the current privilege level. This multi-functional approach reduces the need for separate exception vector tables for each privilege level.

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

Solution Approach 2:

The patent adds a new dimension to exception vector management by introducing privilege level as an additional indexing dimension. Instead of separate exception vector tables for each privilege level, the system uses a single exception vector table with entries that are selectively activated based on the current privilege level. This dimensional approach allows the system to manage exception vectors across multiple privilege levels without proportionally increasing the number of tables required.

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

Data Source

PatentUS10255090B2Hypervisor context switching using a redirection exception vector in processors having more than two hierarchical privilege levels
Publication Date: 2019.04.09 VMWARE INC
  • US10255090B2 patent drawing
  • US10255090B2 patent drawing
  • US10255090B2 patent drawing

AI summary

In a virtualized computer system operable in more than two hierarchical privilege levels, components of a hypervisor, which include a virtual machine kernel and virtual machine monitors (VMMs), are assigned to different privilege levels. The virtual machine kernel operates at a low privilege level to be able to exploit certain features provided by the low privilege level, and the VMMs operate at a high privilege level to support execution of virtual machines. Upon determining that a context switch from the virtual machine kernel to a VMM is to be performed, the computer system exits the low privilege level, and enters the high privilege level to execute a trampoline that supports context switches to VMMs, such as state changes, and then the VMM. The trampoline is deactivated after execution control is switched to the VMM.