Virtual Machine I/O Redirection via Multi-Path Layer
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Virtual machine systems face performance issues with input/output (I/O) functions due to indirect handling by hypervisors or virtual machines, and creating multiple paths to I/O devices for migration and saving is challenging, especially when the I/O device is used for paging, leading to potential system crashes.
Innovation Solution
A method for constructing a device driver stack in a virtual machine partition that does not physically control the device, involving the instantiation of a secondary interface and driver, using a multi-path redirection layer to redirect I/O operations and relinquish control from the existing interface to the new one, allowing for the creation of a new stack and ensuring seamless migration and saving of virtual machine states.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If a virtual machine is allowed to take direct control of physical hardware resources to improve I/O performance, then I/O performance is improved, but the virtual machine becomes incompletely virtualized and features like saving, migrating, and snap-shotting become difficult to accomplish
Solution Approach 1:
The patent segments the I/O control into two distinct paths: a direct path for performance-critical operations and an indirect path for virtualization operations. The direct path allows the virtual machine to control hardware resources directly for high-performance I/O, while the indirect path routed through another virtual machine enables saving, migrating, and snap-shotting operations. This segmentation resolves the contradiction by allowing both direct control and complete virtualization to coexist through separate operational channels.
Solution Approach 2:
The patent introduces an intermediary virtual machine that acts as a mediator between the hardware and the primary virtual machine. This intermediary VM provides the indirect path for virtualization operations, allowing the primary VM to maintain direct hardware control while still enabling saving, migrating, and snap-shotting through the intermediary. The intermediary serves as a bridge that preserves virtualization capabilities without compromising direct I/O performance.
2Adaptability or versatility
If multiple paths to an I/O device are created to enable saving and migrating, then virtualization features are enabled, but it is difficult to set up the second path without giving control of the device to the second path, which may cause paging to stop and system to crash
Solution Approach 1:
The patent applies preliminary action by establishing the indirect path through the intermediary virtual machine before the primary virtual machine needs to migrate or be saved. The intermediary VM is pre-configured with the necessary I/O device control, so when the primary VM needs to be migrated or saved, the path is already in place and operational. This prevents system crashes by ensuring the indirect path is ready beforehand rather than attempting to establish it during critical operations.
Solution Approach 2:
The intermediary virtual machine serves as a safe mediator that holds control of the I/O device during setup and transfer. By using the intermediary as a buffer, the system can safely establish the indirect path without directly transferring control in a way that would disrupt paging or cause crashes. The intermediary manages the device control responsibly, ensuring system stability during the path establishment process.
3Ease of manufacture
If control of the I/O device is passed to the second path before it is completely operational, then the indirect path can be established, but paging may stop and cause the system to crash
Solution Approach 1:
The patent ensures the second path is completely operational and tested before transferring any I/O device control to it. The intermediary virtual machine is fully configured and ready to handle device control responsibilities before the transfer occurs. This preliminary preparation ensures that paging and other critical operations continue uninterrupted during the control transfer process, preventing system crashes while still enabling easy setup of the indirect path.
Data Source
Figure 1a
Figure 1b
Figure 1c
AI summary
Various aspects are disclosed for building a device driver stack in a virtual machine partition that does not physically control the device represented by the stack. In an embodiment, a secondary interface and driver for an I/O device may be instantiated. Information from an I/O virtualization layer describing the devices that the associated driver may control may be requested. A multi-path redirection layer may provide a handle to an existing stack that includes a driver for the I/O device. This existing stack may then be used to communicate with the device and allow the creation of a new stack including an object representing the device and a new driver for the device. The multi-path redirection layer may then open a handle to the new stack and inform the device virtualization layer, which may then ask the existing device interface to relinquish control of the device to the newly created interface.