Virtualizing Performance Counters via Global Enable Indicator

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In virtualization environments, the process of transitioning between host and guest systems requires saving and loading the state of performance counters and their control registers, which can be inefficient and hinder performance.

Innovation Solution

The solution involves enabling or disabling performance counters without the need to save and load their contents, allowing for efficient assignment and sharing between hosts and guests, and controlling their operation through a global counter enable indicator and counter control storage locations to manage counter operations during VM entries and exits.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the state of performance counters and control registers is saved and loaded during transitions between host and guest, then the virtualization environment can maintain counter state information, but the transition overhead increases and performance deteriorates

Engineering Contradiction:
Improvecounter state information maintenanceVSAvoidtransition overhead
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent extracts only the essential counter enable indicator from the full counter state, separating it from the complete counter and register state. This allows the virtualization environment to maintain necessary counter information while avoiding the overhead of saving and loading entire counter states during host-guest transitions.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies different state management approaches to different counter components. Instead of uniformly saving and loading all counter state information, it selectively manages only the counter enable indicator in control storage locations, while allowing other counter states to be managed differently or omitted during transitions.

Inventive Principle:
Principle #3Local quality

2Loss of information

If all counter and control register states are saved during VM exits, then complete state information is preserved, but the complexity of state management increases

Engineering Contradiction:
Improvestate information completenessVSAvoidstate management complexity
Core Design Contradiction:
Loss of informationVSDevice complexity

Solution Approach 1:

The patent extracts only the critical counter enable indicator from the complete counter state information. This selective extraction maintains the essential information needed for counter operation while significantly reducing the amount of state data that must be managed during virtualization transitions.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

Instead of saving complete counter states and then restoring them, the patent inverts the approach by selectively preserving only the counter enable indicator in control storage locations. This inverted strategy simplifies state management by focusing on the minimal necessary information rather than managing comprehensive state data.

Inventive Principle:
Principle #13The other way round (Inversion)

Data Source

PatentUS9244712B2Virtualizing performance counters
Publication Date: 2016.01.26 INTEL CORP
  • US9244712B2 patent drawing
  • US9244712B2 patent drawing
  • US9244712B2 patent drawing

AI summary

Embodiments of apparatuses, methods, and systems for virtualizing performance counters are disclosed. In one embodiment, an apparatus includes a counter, a counter enable storage location, counter enable logic, and virtual machine control logic. The counter enable storage location is to store a counter enable indicator. The counter enable logic is to enable the counter based on the counter enable indicator. The virtual machine control logic is to transfer control of the apparatus to a guest. The virtual machine control logic includes guest state load logic to cause a guest value from a virtual machine control structure to be loaded into the counter enable storage location in connection with a transfer of control of the apparatus to the guest.