Dynamic MSR Instrumentation via Kernel API

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing virtual machine introspection techniques require manual hardcoding and porting of the virtual machine monitor (VMM) to support new model specific registers (MSRs), leading to performance impacts and limited flexibility in MSR instrumentation, especially when new MSRs are introduced by chipset manufacturers.

Innovation Solution

A dynamic MSR instrumentation method is introduced, where a kernel application program interface (API) allows external applications to dynamically specify which MSRs to instrument, enabling dynamic control over VM exits and supporting new MSRs without prior VMM porting, through a virtual machine control structure (VMCS) configuration.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If manual hardcoding of VMM is used to support new MSRs, then MSR instrumentation capability is achieved, but adaptability to new MSRs deteriorates

Engineering Contradiction:
Improveadaptability to new MSRsVSAvoidVMM porting complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent introduces a kernel API as an intermediary layer between applications and the VMM's MSR handling mechanisms. This API provides standardized interfaces for MSR instrumentation requests, allowing new MSRs to be instrumented without direct VMM modifications. The intermediary abstracts the complexity, enabling adaptability while maintaining manageable system complexity through established interfaces.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system transitions from static, hardcoded MSR support in the VMM to dynamic MSR instrumentation where the set of instrumented MSRs can be changed at runtime through API calls. This dynamic approach allows the system to adapt to new MSRs without requiring VMM reconfiguration or recompilation, effectively resolving the adaptability-complexity contradiction.

Inventive Principle:
Principle #15Dynamics

2Measurement precision

If comprehensive MSR instrumentation is implemented, then introspection capability is improved, but performance overhead increases

Engineering Contradiction:
Improveintrospection capabilityVSAvoidperformance overhead
Core Design Contradiction:
Measurement precisionVSLoss of energy

Solution Approach 1:

Instead of uniformly instrumenting all MSRs throughout the system, the patent enables selective instrumentation where only specific MSRs can be instrumented based on application needs. The kernel API allows targeted MSR instrumentation requests, and the VMM processes only those specific MSR accesses that have been explicitly requested for instrumentation, reducing unnecessary overhead while maintaining precise introspection where needed.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The system implements partial instrumentation by allowing applications to request instrumentation only for the specific MSRs they need to monitor, rather than instrumenting all possible MSRs. This partial action approach provides sufficient introspection capability for each application's needs while minimizing the overall performance overhead across the system.

Inventive Principle:
Principle #16Partial or excessive action

3Adaptability or versatility

If dynamic MSR instrumentation is enabled, then flexibility is improved, but VMM complexity increases

Engineering Contradiction:
Improveflexibility in MSR instrumentationVSAvoidVMM configuration complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The kernel API serves as an intermediary that manages the complexity of dynamic MSR instrumentation. Rather than exposing complex VMM configuration mechanisms directly to applications, the API provides simplified, standardized interfaces for MSR instrumentation requests. This intermediary layer handles the complexity internally while presenting a clean, flexible interface to users, achieving both flexibility and manageable complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11544092B2Model specific register (MSR) instrumentation
Publication Date: 2023.01.03 NIGHTWING GROUP LLC
  • US11544092B2 patent drawing
  • US11544092B2 patent drawing
  • US11544092B2 patent drawing

AI summary

Techniques are disclosed for dynamic access and instrumentation of model specific registers (MSRs). A virtual machine monitor (VMM) can provide a kernel application program interface (API) that can be utilized to access and instrument an MSR. A method may include receiving, by the VMM, an MSR instrumentation command that identifies an MSR to instrument and causing instrumentation of the MSR identified in the MSR instrumentation command. Instrumentation of the identified MSR can be caused by configuring or manipulating a virtual machine control structure (VMCS) of a guest virtual machine (VM). The MSR instrumentation command may be an MSR instrumentation request command, an MSR remove request command, an MSR value set request command, or an MSR value fetch request command. In some cases, the VMM may be a Type-I hypervisor.