Guest Timer Facility for Virtualized Processing Systems

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In virtualized processing systems, frequent access to the Advanced Configuration and Power Interface (ACPI) Power Management Timer by guest operating systems leads to inefficient performance due to the need for multiple world switches, as the timer is indirectly accessible and emulated by the virtual machine monitor, resulting in substantial cycles wasted and performance degradation.

Innovation Solution

A PM Timer facility is implemented that generates a local value of the ACPI Power Management Timer based on the guest Time Stamp Counter, reducing the need for world switches by calculating the timer value locally without causing a switch to the virtual machine monitor, using a formula such as PM—TMR=(current_guest—TSC/current_guest—TSC_rate/PM—TMR_freq)+offset, where current_guest_TSC is the current Time Stamp Counter value and current_guest_TSC_rate is determined based on the host TSC rate and guest TSC ratio.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If the PM Timer is emulated by the virtual machine monitor, then the timer is accessible to guest operating systems, but the access requires multiple world switches causing performance degradation

Engineering Contradiction:
Improvetimer accessibilityVSAvoidaccess performance
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent creates a local copy of the PM Timer value in the guest mode processing system. Instead of requiring the guest to access the original PM Timer through the virtual machine monitor (which requires world switches), the system generates and maintains a local copy of the timer value that the guest can access directly. This copying approach preserves timer accessibility while eliminating the performance penalty of frequent world switches.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent introduces an intermediary mechanism that generates the local PM Timer value based on the Time Stamp Counter without requiring direct access to the original PM Timer. This intermediary calculation layer allows the guest operating system to access timer functionality through a local value rather than through the virtual machine monitor, resolving the contradiction between accessibility and performance.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If the PM Timer is directly accessible in guest mode, then access performance improves, but the timer becomes inaccessible in host mode

Engineering Contradiction:
Improveaccess speedVSAvoidmode accessibility
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent implements different access characteristics for different modes. In guest mode, the system provides direct access to a local copy of the PM Timer value for high performance. In host mode, the system maintains access to the original PM Timer through the virtual machine monitor. This local quality approach allows each mode to have optimized access characteristics appropriate to its needs.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent segments the timer access functionality into two separate access paths: one for guest mode that uses a local copied value for fast access, and another for host mode that accesses the original timer through the virtual machine monitor. This segmentation allows both modes to access timer functionality with appropriate performance characteristics without conflicting requirements.

Inventive Principle:
Principle #1Segmentation

3Measurement precision

If world switches are performed for each PM Timer access, then timer accuracy is maintained, but substantial processing cycles are wasted

Engineering Contradiction:
Improvetimer accuracyVSAvoidprocessing cycles
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent performs preliminary action by generating the local PM Timer value in advance through calculation from the Time Stamp Counter. This local value is maintained and updated without requiring world switches, allowing the guest operating system to access timer information without the overhead of repeated world switches. The preliminary calculation preserves timer accuracy while eliminating the time loss from frequent mode switching.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS8490089B2Guest timer facility to improve management in a virtualized processing system
Publication Date: 2013.07.16 ADVANCED MICRO DEVICES INC
  • US8490089B2 patent drawing
  • US8490089B2 patent drawing
  • US8490089B2 patent drawing

AI summary

A method includes, in a virtualized processing system, generating a local value of a first counter. The local value is accessible while executing in a first mode of the virtualized processing system. The local value is generated based on a value of a second counter and a ratio of a rate of the first counter to a rate of the second counter. The first counter is inaccessible while executing in the first mode of the virtualized processing system and accessible while executing in a second mode of the virtualized processing system. The first mode may be a guest mode and the second mode may be a host mode. The first counter may be an ACPI Power Management Timer. The second counter may be a Time Stamp Counter.