Host Virtual Counter Scaling for Cross-Host VM Migration

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing CPUs, such as those compatible with the ARMv8 architecture, lack a mechanism to scale virtual counters and timers, which is necessary for scenarios like time warping or VM migration between hosts with different clock frequencies.

Innovation Solution

A hypervisor creates a guest virtual counter with scaling factors and maps it into the VM's memory, notifying the guest OS to paravirtualize the host virtual counter and timer, allowing the hypervisor to modify access based on these factors.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If direct access to hardware registers is allowed, then ease of operation is improved, but adaptability deteriorates because scaling cannot be implemented

Engineering Contradiction:
Improveaccess to timer-counterVSAvoidtime scaling capability
Core Design Contradiction:
Ease of operationVSAdaptability or versatility

Solution Approach 1:

The patent introduces a virtual counter register and virtual timer registers as intermediary layers between applications and hardware registers. These virtual registers are accessed through paravirtualized functions that apply scaling factors, enabling time scaling while maintaining ease of access for applications. The virtual counter value is derived from the system count through scaling operations without requiring direct hardware register access.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If VM migration between hosts with different clock frequencies is supported, then adaptability is improved, but device complexity increases due to additional scaling mechanisms

Engineering Contradiction:
ImproveVM migration capabilityVSAvoidcounter and timer mechanism
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent implements scaling factors (multiplicand, addend, shift) that can be dynamically adjusted based on the host environment. When a VM migrates between hosts with different clock frequencies, the paravirtualized functions update these scaling parameters to maintain consistent timing behavior. This allows adaptation to different hardware configurations without fundamentally changing the counter and timer architecture.

Inventive Principle:
Principle #35Parameter changes

3Adaptability or versatility

If virtualization layer is introduced, then adaptability is improved for time warping and migration, but device complexity increases

Engineering Contradiction:
Improvetime manipulation capabilityVSAvoidvirtualization structure
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent segments the timing functionality into distinct layers: hardware counters, virtual counter registers, and paravirtualized access functions. This segmentation allows the virtualization layer to manipulate time through scaling factors without requiring complex changes to the underlying hardware. Each layer has a specific responsibility, simplifying the overall virtualization structure while maintaining adaptability.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS12367057B2Scaling a host virtual counter and timer in a virtualized computer system
Publication Date: 2025.07.22 VMWARE INC
  • US12367057B2 patent drawing
  • US12367057B2 patent drawing
  • US12367057B2 patent drawing

AI summary

An example method of virtualizing a host virtual counter and timer in a central processing unit (CPU) of a virtualized host computer includes: creating, by a hypervisor of the host computer in response to power on of a virtual machine (VM), a guest virtual counter, the guest virtual counter comprising a data structure including scaling factors; mapping a shared memory page having the data structure into an address space of memory allocated to the VM; and notifying a guest operating system (OS) of the VM of a location in the address space for the shared memory page having the data structure, the guest OS being paravirtualized to scale the host virtual counter and timer based on the scaling factors of the guest virtual counter.