Unified Hypercall Interface for Virtualized Systems

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for a guest operating system in a virtual machine to interface with a hypervisor are limited, as they often require privileged mode and are not usable by unprivileged code, leading to restricted functionality and potential crashes or errors.

Innovation Solution

A method that uses an I/O space instruction, not supported by the processor, for backdoor communication between the hypervisor and guest software, allowing execution at various privilege levels, including unprivileged code, by writing parameters to specific registers and executing an instruction trapped to a higher privilege level, enabling safe detection and handling of hypercalls.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If a hypervisor call instruction is used for communication between guest OS and hypervisor, then the communication can be established, but the method is restricted to privileged mode code only and cannot be used by regular applications

Engineering Contradiction:
ImproveAccessibility of hypervisor interfaceVSAvoidPrivilege level compatibility
Core Design Contradiction:
Ease of operationVSAdaptability or versatility

Solution Approach 1:

The patent introduces an intermediary mechanism by mapping guest virtual registers to host processor registers and using a trapped instruction as a mediator. When guest code (at any privilege level) executes the trapped instruction, it transitions to hypervisor privilege level, allowing the hypervisor to handle the call. This intermediary approach enables unprivileged guest code to communicate with the hypervisor without directly using privileged hypervisor call instructions.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent changes the dimension of privilege level access by introducing a trapped instruction mechanism that allows code at lower privilege levels to trigger hypervisor calls. Instead of requiring direct privileged mode execution, the system uses a trap dimension where any privilege level can initiate communication, and the privilege escalation happens automatically through the trap mechanism.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Reliability

If privileged mode restriction is enforced for hypervisor calls, then system security and control are maintained, but functionality is limited and may cause crashes or errors in unprivileged code

Engineering Contradiction:
ImproveSystem stabilityVSAvoidCode execution flexibility
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The trapped instruction acts as a safe intermediary that maintains security while enabling flexibility. When unprivileged code executes the trapped instruction, it safely transitions to hypervisor mode through a controlled mechanism rather than allowing direct privileged instruction execution. This preserves system security boundaries while enabling unprivileged code to communicate with the hypervisor without crashes.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent creates a universal interface mechanism that works across all privilege levels. The trapped instruction and register mapping system provides a multi-functional pathway that serves both privileged and unprivileged code, eliminating the need for separate communication mechanisms and preventing privilege-level-related crashes.

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

3Adaptability or versatility

If a unified interface is provided for all guest code to interface with the hypervisor, then accessibility is improved, but the complexity of the interface mechanism increases

Engineering Contradiction:
ImproveInterface accessibilityVSAvoidInterface mechanism complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent uses register copying/mapping where guest virtual registers are mapped to host processor registers. This copying mechanism provides a unified interface appearance to guest code while the underlying implementation handles the complexity of privilege level management, trapped instruction handling, and hypervisor context switching.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS11550609B2Unified hypercall interface across processors in virtualized computing systems
Publication Date: 2023.01.10 VMWARE INC
  • US11550609B2 patent drawing
  • US11550609B2 patent drawing
  • US11550609B2 patent drawing

AI summary

An example method of interfacing with a hypervisor in a computing system is described, which includes a processor having at least three hierarchical privilege levels including a third privilege level more privileged than a second privilege level, the second privilege level more privileged than a first privilege level. The method includes: identifying an input/output (I/O) space instruction, not supported by the processor, to be performed for backdoor communication between the hypervisor and guest software executing in a virtual machine (VM) managed by the hypervisor, the hypervisor executing at the third privilege level; writing one or more parameters to one or more registers of the processor that are mapped to one or more unsupported registers used by the I/O space instruction; writing a value indicative of the I/O space instruction to a designated register of the processor; executing an instruction, by the guest software executing at the first or second privilege level, which is trapped to the third privilege level.