Virtual Machine Device Assignment With Readiness-Triggered Hot-Plug

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional microservice architectures face issues with unreliable device attachment to virtual machine (VM) based containers due to race conditions during the guest operating system boot process, leading to unsuccessful attachments and increased creation times, as wait periods are unreliable and inefficient.

Innovation Solution

Implementing a processing logic that monitors VM registers to determine readiness for device hot-plugging, using a hypervisor to poll emulated PCI controller registers and issue attachment operations only when the VM is ready, ensuring successful device attachment without restarts or shutdowns.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a pre-configured wait period is used to ensure guest OS readiness for device attachment, then device attachment reliability is improved, but container creation time increases and performance decreases

Engineering Contradiction:
Improvedevice attachment reliabilityVSAvoidcontainer creation time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent implements a feedback mechanism where the hypervisor continuously monitors VM registers (specifically PCI controller registers) to detect when the guest OS is ready for device attachment. This replaces the blind wait period with an event-driven approach that triggers device attachment exactly when the VM is ready, eliminating unnecessary delays while ensuring reliability.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The VM itself signals readiness through its register state changes during the boot process. The hypervisor polls these registers to detect when the guest OS has completed its initialization and is ready to receive devices. This self-service mechanism allows the system to determine readiness autonomously without external intervention or fixed timing.

Inventive Principle:
Principle #25Self-service

2Productivity

If device attachment is triggered immediately after container creation, then container creation time is reduced, but device attachment reliability deteriorates due to race conditions

Engineering Contradiction:
Improvecontainer creation speedVSAvoiddevice attachment reliability
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent prepares the device attachment mechanism in advance by having the hypervisor continuously monitor VM registers starting from VM creation. This preliminary monitoring action ensures that as soon as the VM becomes ready (without waiting for a fixed period), the device attachment can be immediately triggered, thus maintaining fast container creation while ensuring reliable device attachment.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The continuous polling of VM registers provides real-time feedback on VM readiness state. This feedback mechanism allows the system to detect the exact moment when the guest OS is ready for device attachment, enabling immediate attachment without race conditions while avoiding unnecessary delays.

Inventive Principle:
Principle #23Feedback

3Reliability

If the hypervisor polls VM registers continuously to detect readiness, then device attachment reliability is improved, but system complexity increases

Engineering Contradiction:
Improvedevice attachment reliabilityVSAvoidmonitoring mechanism complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent uses VM registers as an intermediary mechanism between the guest OS and the hypervisor. These registers serve as a standardized interface that the hypervisor can poll to detect readiness without needing to implement complex monitoring logic. The registers act as a mediator that simplifies the interaction and reduces overall system complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS12367056B2Reliable device assignment for virtual machine based containers
Publication Date: 2025.07.22 RED HAT LLC
  • US12367056B2 patent drawing
  • US12367056B2 patent drawing
  • US12367056B2 patent drawing

AI summary

A device attachment request to attach a device to a container within a virtual machine is received. The virtual machine is monitored to determine whether the virtual machine is ready for a hot-plug of the device. An indication that the virtual machine is ready for the hot-plug of the device is received from the virtual machine. A device hot-plug operation is issued to cause the device to be hot-plugged to the virtual machine.