Para-virtualized Device Emulation via Hypervisor Shared Memory
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Virtual machines in virtualized environments face high operational overhead due to the need for frequent communication and control transfers between the VM and the hypervisor when accessing physical devices, as the VM lacks direct knowledge of the physical device and relies on the hypervisor for emulation.
Innovation Solution
Implementing a para-virtualized device as an interface between the device driver and the physical device, using shared memory to store instructions and minimize control switches, allowing the hypervisor to monitor and handle instructions without VM intervention, thereby reducing emulation overhead.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If the hypervisor emulates the device interface in software, then the VM can access the physical device through emulation, but the operational overhead increases significantly due to frequent control transfers between VM and hypervisor
Solution Approach 1:
The patent introduces a device driver as an intermediary component that resides in the VM's address space and can directly interact with the physical device through the hypervisor's I/O memory-mapped interface. This intermediary eliminates the need for frequent control transfers by allowing the device driver to handle device operations directly while still benefiting from hypervisor-managed resource access.
Solution Approach 2:
The patent segments the device access functionality by separating the device driver (residing in VM address space) from the hypervisor's emulation layer. This segmentation allows the device driver to operate independently with direct access to device registers through shared I/O memory-mapped space, reducing the overhead of continuous VM-hypervisor control transfers.
2Ease of operation
If the VM has no knowledge that the emulated device is not a real physical device, then the emulation interface is transparent to the VM, but the overhead of emulating the interface in software increases
Solution Approach 1:
The patent creates a virtual copy of the physical device interface through the device driver that replicates the behavior of a real device. The device driver copies the essential interface functionality, allowing the VM to interact with it as if it were a real device, while the actual device communication is handled efficiently through the hypervisor's I/O memory-mapped interface.
Solution Approach 2:
The device driver serves as an intermediary that maintains emulation transparency for the VM while eliminating the need for full software emulation. It provides the transparent interface the VM expects while using direct I/O memory-mapped access to communicate with the physical device, reducing emulation overhead.
3Adaptability or versatility
If control is transferred intermittently between VM and hypervisor when accessing a device, then the VM can access the physical device through the hypervisor, but the operational overhead becomes even more costly
Solution Approach 1:
The patent implements preliminary action by establishing the device driver in the VM's address space before device operations begin. The device driver is pre-configured with direct access to the I/O memory-mapped interface, so that when device operations are needed, no control transfer is required - the device driver can immediately access device registers through the pre-established interface.
Solution Approach 2:
The device driver acts as a permanent intermediary that eliminates intermittent control transfers. Once installed, it continuously mediates between the VM and the physical device through direct I/O memory-mapped access, removing the need for repeated control transfers that would otherwise occur with pure software emulation.
Data Source
AI summary
Systems and methods for optimizing operation of a physical device in a virtualized computing environment are provided. The method comprises monitoring instructions issued by an application running on a virtual machine's (VM) operating system, wherein the VM is hosted by a hypervisor providing access to a physical device connected to a virtualized computing environment; wherein a device driver supported by the operating system issues one or more instructions to an emulated device supported by the hypervisor to control the physical device according to the issued instructions, wherein the emulated device's registers are implemented in memory of the hypervisor and the instructions issued by the device driver are stored in said registers, wherein the hypervisor handles the instructions, in response to learning that the instructions are stored in said registers.


