Virtual Machine World Switch State Register Dirty Bit Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current virtualization technologies in data processing devices face inefficiencies in world switch times due to the need to save and restore processor state information, which can be extensive and time-consuming, especially when switching between virtual machines and guest programs.

Innovation Solution

Implementing state registers with dirty and clean bits to selectively save and load only modified state information during world switches, and using shadow registers to maintain state information during virtual machine execution, thereby reducing the amount of data transferred during these switches.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If all processor state information is saved and restored during world switches, then complete state preservation is achieved, but world switch time increases significantly

Engineering Contradiction:
Improvestate preservation completenessVSAvoidworld switch time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent extracts only the modified state information from the complete processor state using dirty bits as markers. Instead of saving all state registers, the system identifies and saves only those registers whose dirty bits are set, thereby reducing the amount of data transferred during world switches while maintaining complete preservation of all necessary state changes.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies partial action by saving only a portion of the processor state information - specifically, only the modified portions indicated by dirty bits - rather than performing a complete save of all state registers. This partial saving approach reduces world switch time while still achieving the necessary state preservation for correct operation.

Inventive Principle:
Principle #16Partial or excessive action

2Loss of information

If complete processor state is saved during world switches, then state accuracy is maintained, but the amount of data transferred increases

Engineering Contradiction:
Improvestate information accuracyVSAvoiddata transfer volume
Core Design Contradiction:
Loss of informationVSQuantity of substance

Solution Approach 1:

The patent extracts only the modified state information from the complete processor state using dirty bits as markers. Instead of saving all state registers, the system identifies and saves only those registers whose dirty bits are set, thereby reducing the amount of data transferred during world switches while maintaining complete preservation of all necessary state changes.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent changes the parameter of data transfer volume by introducing dirty bits that track which state registers have been modified. This parameter change allows the system to dynamically determine the actual amount of state information that needs to be saved, reducing the average data transfer volume while ensuring all necessary state changes are captured.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If all state registers are saved and restored, then complete state restoration is achieved, but world switch performance decreases

Engineering Contradiction:
Improvestate restoration completenessVSAvoidworld switch performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts only the modified state information from the complete processor state using dirty bits as markers. Instead of saving all state registers, the system identifies and saves only those registers whose dirty bits are set, thereby reducing the amount of data transferred during world switches while maintaining complete preservation of all necessary state changes.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies partial action by saving only a portion of the processor state information - specifically, only the modified portions indicated by dirty bits - rather than performing a complete save of all state registers. This partial saving approach reduces world switch time while still achieving the necessary state preservation for correct operation.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS8612975B2World switch between virtual machines with selective storage of state information
Publication Date: 2013.12.17 ADVANCED MICRO DEVICES INC
  • US8612975B2 patent drawing
  • US8612975B2 patent drawing
  • US8612975B2 patent drawing

AI summary

A data processing device includes one or more state registers to store state information associated with an execution core of the device. Each state register includes an associated “dirty” bit. When a guest program is executed at the execution core, a dirty bit is set in response to a change in the state information at the associated state register. In response to a world switch from the guest program to a VMM, the state information at each state register is stored to memory only if the associated dirty bit is set. In addition, if the VMM changes any stored state information, it clears a “clean” bit associated with the changed information. In response to a world switch from the VMM to a guest, the state information associated with cleared clean bits is retrieved from memory.