Asynchronous Hot-Plug I/O Mapping for Virtual Machines

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Virtual machines experience stalls during hot-plugging or removal of I/O devices due to the overhead of hypervisor pinning and IOMMU mapping operations, which can lead to disruptions in continuous execution.

Innovation Solution

Implementing a multi-threaded model for asynchronous memory pinning and IOMMU mapping, where these operations are performed independently of virtual processor execution, ensuring that I/O devices become visible or are removed only after completion notifications are received, allowing for continuous virtual machine execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If memory pinning and IOMMU mapping operations are performed synchronously during I/O device hot-plugging, then device visibility is ensured, but virtual machine execution stalls occur

Engineering Contradiction:
Improvedevice visibilityVSAvoidvirtual machine execution continuity
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent performs memory pinning and IOMMU mapping operations in advance before the virtual machine needs to access the hot-plugged I/O device. By completing these overhead operations beforehand, the device is ready for immediate access without causing execution stalls during critical VM operations.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces dynamic threading where separate worker threads handle memory pinning and IOMMU mapping operations independently from the main virtual processor execution threads. This dynamic separation allows the system to maintain device visibility while preventing execution stalls by decoupling the timing of these operations from VM execution flow.

Inventive Principle:
Principle #15Dynamics

2Productivity

If memory pinning and IOMMU mapping operations are performed independently, then virtual machine execution continues without stalls, but device visibility timing becomes complex

Engineering Contradiction:
Improvevirtual machine execution continuityVSAvoidoperation coordination
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent implements feedback mechanisms where worker threads performing memory pinning and IOMMU mapping operations signal completion back to the main execution flow. This feedback system ensures that device visibility is properly coordinated despite the independent execution of operations, maintaining correctness while enabling continuous VM execution.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent introduces intermediary worker threads that act as mediators between the hot-plug trigger and the actual memory pinning/IOMMU mapping operations. These intermediary threads buffer and coordinate the timing of operations, simplifying the overall system by providing a clear interface between device insertion events and the complex sequence of required operations.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11036666B2Asynchronous mapping of hot-plugged device associated with virtual machine
Publication Date: 2021.06.15 RED HAT ISRAEL
  • US11036666B2 patent drawing
  • US11036666B2 patent drawing
  • US11036666B2 patent drawing

AI summary

Systems and methods for asynchronous mapping of a hot-plugged I/O device associated with a virtual machine. An example method comprises: executing, by a host computer system, a virtual machine managed by a hypervisor, wherein the virtual machine is associated with a hot-pluggable input/output (I/O) device; responsive to detecting removal of the I/O device, unpin a memory buffer associated with the I/O device; and responsive to receiving a signal indicating completion of unpinning the memory buffer, release the I/O device from the hypervisor.