Virtual Time Counter Scaling for VM Migration
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Virtualization technologies face challenges when guest software is migrated from one physical platform to another with a different CPU frequency, causing disruptions in time-keeping functions and potential crashes due to changes in the rate of the physical CPU time counter.
Innovation Solution
Implementing a scaling mechanism between the physical and virtual time counters by using a configurable scale factor, allowing the guest to access a virtual time counter that maintains a constant frequency across CPU frequency changes, eliminating the need for VMM intervention and ensuring seamless migration.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If guest software is migrated to a physical platform with a different CPU frequency, then migration flexibility and platform adaptability are improved, but time-keeping reliability deteriorates due to changes in the physical CPU time counter rate
Solution Approach 1:
The patent introduces a virtual time counter as an intermediary between the guest software and the physical CPU time counter. This virtual counter is scaled according to the ratio of original to new CPU frequencies, allowing the guest to perceive a consistent time passage rate regardless of the underlying physical platform changes. The virtual time counter mediates the interaction, preventing direct exposure of physical counter variations to the guest.
Solution Approach 2:
The patent changes the parameter of the time counter by introducing a scaling factor that adjusts the virtual time counter's rate based on CPU frequency ratios. The scaling factor is calculated as the ratio of the original CPU frequency to the new CPU frequency, transforming the physical counter's output to maintain temporal consistency across platform migrations.
2Adaptability or versatility
If the physical CPU time counter rate changes due to frequency differences, then platform adaptability is improved, but guest operation stability deteriorates causing potential crashes
Solution Approach 1:
The virtual time counter serves as a protective intermediary that isolates the guest from physical platform variations. By presenting a stabilized time value derived from scaling the physical counter, it prevents unstable time readings from reaching the guest, thereby maintaining operational stability during platform transitions.
Solution Approach 2:
The patent applies beforehand cushioning by pre-calculating and applying the scaling factor before the guest accesses the time counter during migration. This anticipatory adjustment ensures that the guest receives already-stabilized time values, cushioning it against the potential harmful effects of frequency changes before they can cause instability or crashes.
3Device complexity
If direct access to physical CPU time counter is used, then device complexity is reduced, but time counter accuracy deteriorates during migration due to frequency changes
Solution Approach 1:
The virtual time counter acts as an intermediary layer that maintains simplicity for the guest while improving accuracy. The guest continues to access a time counter in the usual way (maintaining low complexity), but the virtual counter provides accurate, frequency-invariant time measurements by scaling the physical counter readings.
Solution Approach 2:
The patent creates a virtual copy of the physical time counter that is adjusted for frequency differences. This copy presents the same interface to the guest but provides corrected time values by applying the scaling factor, thereby maintaining both simplicity of access and accuracy of measurement during migration.
Data Source
AI summary
In one embodiment, the present invention includes a method for determining a scaling factor between a frequency of a first processor and a frequency of a second processor after a guest software is migrated from first processor to the second processor, and executing the guest software on the second processor using a virtual counter based on a physical counter of the second processor and the scaling factor. Other embodiments are described and claimed.


