Runtime Virtualization of I/O Devices by VMM
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Virtual machine monitors (VMMs) incur unnecessary overhead by virtualizing hardware from bootup to shutdown, even when only a single operating system is running, due to the continuous interception of I/O instructions and use of two levels of interrupt handlers.
Innovation Solution
Implementing runtime virtualization and devirtualization of I/O devices, where virtualization begins and ends as needed, by redirecting interrupts, configuring hardware traps, and using state machines to manage I/O operations, allowing the VMM to emulate I/O operations only when necessary.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If the VMM virtualizes hardware from bootup to shutdown, then multiple operating systems can run simultaneously on the same hardware, but unnecessary overhead is incurred even when only a single OS is running
Solution Approach 1:
The patent implements dynamic virtualization by allowing the VMM to switch between virtualized and non-virtualized modes at runtime. When multiple OSes are active, the VMM virtualizes hardware resources; when a single OS remains, it devirtualizes to eliminate overhead. This dynamic adaptation resolves the contradiction between maintaining multi-OS capability and optimizing single-OS performance.
Solution Approach 2:
The system changes the virtualization parameter state based on the number of active operating systems. The VMM monitors OS lifecycle events and adjusts the virtualization level accordingly - maintaining full virtualization when needed for multi-OS support, and transitioning to direct hardware access when only one OS remains, thus resolving the performance penalty.
2Adaptability or versatility
If the VMM intercepts I/O instructions and uses two levels of interrupt handlers, then I/O operations can be performed on behalf of unaware OS drivers, but I/O processing speed is slowed
Solution Approach 1:
The patent extracts the VMM's I/O interception and emulation functionality from the normal execution path. By implementing runtime devirtualization, the system removes the intermediate VMM layer for I/O operations when possible, allowing direct hardware access and eliminating the overhead of two-level interrupt handling, thus resolving the speed penalty while maintaining driver compatibility through selective emulation.
Solution Approach 2:
The VMM acts as an intermediary that can be dynamically enabled or disabled. When OS drivers are unaware of virtualization, the VMM mediates I/O operations through emulation. When performance is critical and drivers are aware, the intermediary role is minimized or removed, allowing direct communication between drivers and hardware, thus resolving the speed versus compatibility trade-off.
3Reliability
If the VMM maintains hardware control from bootup to shutdown, then hardware virtualization can be maintained continuously, but overhead is incurred even when virtualization is not necessary
Solution Approach 1:
The patent implements periodic reassessment of virtualization necessity by monitoring OS lifecycle events. Instead of maintaining continuous hardware control, the VMM periodically evaluates whether virtualization is needed based on the number of active OSes and transitions between virtualized and non-virtualized states, thus reducing energy consumption and overhead while maintaining reliability when needed.
Solution Approach 2:
The system dynamically changes the hardware control parameter from continuous VMM mediation to direct hardware access based on runtime conditions. When multiple OSes are running, the VMM maintains control; when a single OS remains, control is transferred directly to the OS, eliminating unnecessary overhead and energy consumption while preserving system reliability through conditional virtualization.
Data Source
AI summary
A virtual machine monitor can be used to commence virtualization of an I/O device of a computer at runtime. The virtual machine monitor can also be used to devirtualize an I/O device of a computer at runtime.


