Hypervisor Hyper-callbacks for Safe Guest OS Execution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The semantic gap between hypervisors and guest operating systems in virtualized environments leads to inefficiencies due to lack of detailed knowledge of resource management policies, resulting in suboptimal decision-making and potential conflicts, particularly in scenarios like memory management and I/O operations.

Innovation Solution

The introduction of hyper-callbacks, which allow for quick, safe execution of guest OS-specific functions within the hypervisor context without context switches, enabling improved communication and policy decisions through registered callback byte code that provides information about the guest OS, facilitating better resource management and scheduling.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of information

If paravirtualization is used to improve communication between hypervisor and guest OS, then information exchange is improved, but execution speed deteriorates due to context switches

Engineering Contradiction:
Improveinformation exchange between hypervisor and guest OSVSAvoidexecution speed due to context switches
Core Design Contradiction:
Loss of informationVSLoss of time

Solution Approach 1:

The patent segments the communication mechanism into two parts: (1) a registration phase where the guest OS registers callback functions with the hypervisor, and (2) an execution phase where the hypervisor directly invokes these callbacks without context switches. This segmentation allows information exchange to be established once, then reused efficiently multiple times.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a callback function as an intermediary mechanism that bridges the hypervisor and guest OS. The callback is registered with the hypervisor and can be invoked directly, acting as a mediator that eliminates the need for context switches while maintaining communication capabilities.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If VMI is used to allow hypervisor to inspect VM data structures, then policy decision-making is improved, but system reliability deteriorates due to tight coupling

Engineering Contradiction:
Improvepolicy decision-making efficiencyVSAvoidsystem stability when guest OS changes
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies preliminary action by having the guest OS register its callback functions with the hypervisor in advance. During this registration phase, the hypervisor obtains necessary information about the guest OS's resource management policies. This preliminary information gathering allows the hypervisor to make informed policy decisions later without needing to inspect or depend on the guest OS's internal data structures.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If balloon driver is added to guest OS for memory management, then memory reclamation is improved, but ease of operation deteriorates due to modifications required for each OS release

Engineering Contradiction:
Improvememory reclamation efficiencyVSAvoidease of implementation across different OS versions
Core Design Contradiction:
ProductivityVSEase of manufacture

Solution Approach 1:

The patent creates a universal callback registration mechanism that can work with any guest OS without requiring modifications to the OS itself. The hypervisor can register callbacks and receive notifications about resource management events through this standardized interface, making the solution applicable across different OS versions and types without the need for version-specific drivers.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS11726807B2Safe execution of virtual machine callbacks in a hypervisor
Publication Date: 2023.08.15 VMWARE INC
  • US11726807B2 patent drawing
  • US11726807B2 patent drawing
  • US11726807B2 patent drawing

AI summary

A hypervisor communicates with a guest operating system running in a virtual machine supported by the hypervisor using a hyper-callback whose functions are based on the particular guest operating system running the virtual machine and are triggered by one or more events in the guest operating system. The functions are modified to make sure they are safe to execute and to allow only limited access to the guest operating system. Additionally, the functions are converted to byte code corresponding to a simplified CPU and memory model and are safety checked by the hypervisor when registered with the hypervisor. The functions are executed by the hypervisor without any context switch between the hypervisor and guest operating system, and when executed, provide information about the particular guest operating system, allowing the hypervisor to improve operations such as page reclamation, virtual CPU scheduling, I/O operations, and tracing of the guest operating system.