Virtual Machine Pass-Through Device Migration via Emulation Handler
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The migration of virtual machines with pass-through devices is complicated by the need to tear down and reload device drivers during migration, resulting in significant service interruptions due to the storage of device state in hardware devices rather than emulated devices.
Innovation Solution
Replacing pass-through devices with emulation handlers that simulate fatal hardware errors, allowing for error reporting and reinitialization upon migration, thereby eliminating the need for driver teardown and reload.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If pass-through devices are used to improve I/O performance, then device access speed is improved, but migration complexity increases due to device state storage in hardware
Solution Approach 1:
An emulation handler is introduced as an intermediary component between the device driver and the pass-through device. The emulation handler intercepts device driver requests, manages device state in guest memory, and coordinates with the hypervisor during migration, thereby resolving the conflict between maintaining fast direct device access and enabling seamless migration without driver teardown.
Solution Approach 2:
The emulation handler is installed and configured before migration occurs. It pre-establishes the mechanism for capturing device state in guest memory and preparing for migration, allowing the actual migration to proceed without tearing down the device driver, thus eliminating service interruption.
2Reliability
If device drivers are torn down and reloaded during migration, then device state can be transferred, but service interruption time increases
Solution Approach 1:
The device driver remains loaded and operational throughout the migration process. The emulation handler continuously intercepts requests and manages device state transitions, ensuring that the device driver's useful action (handling I/O requests) continues without interruption, while migration occurs in the background.
Solution Approach 2:
The device state is copied from hardware storage to guest memory under the management of the emulation handler. This copying mechanism allows the device state to be transferred to the destination host without requiring the device driver to be torn down and reloaded, thereby eliminating service interruption.
3Reliability
If device state is stored in hardware devices, then device performance is maintained, but migration becomes difficult due to state capture requirements
Solution Approach 1:
The device state is moved from a single hardware dimension to a dual dimension system: hardware devices maintain performance-critical state while guest memory stores migration-critical state under emulation handler management. This dimensional separation allows both high performance and easy migration to coexist.
Solution Approach 2:
The emulation handler serves multiple functions: it maintains device performance by intercepting requests, enables migration by managing state in guest memory, and coordinates with the hypervisor. This multi-functionality resolves the contradiction between maintaining hardware-based performance and achieving software-based migration ease.
Data Source
AI summary
Virtual machines that utilize pass-through devices are migrated from a source host computer to a destination host computer. During preparation for migration, the pass-through device is substituted with an emulation handler that simulates the pass-through device experiencing errors. Upon successful migration, an error reporting signal is triggered to cause the device driver in the virtual machine to initiate a reset of the pass-through device at the destination host computer, upon which the pass-through device is mapped to the migrated virtual machine.


