Virtual IOMMU for Tracking VM Memory Encryption Status
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In virtualized computer systems, hypervisors face challenges in determining which memory pages are encrypted and which are not, as existing methods like para-virtualization require modifications to the guest operating system and can corrupt guest memory when decrypting and re-encrypting with address-dependent keys.
Innovation Solution
The use of Input/Output Memory Management Units (IOMMUs) to track the encryption status of memory pages, allowing the hypervisor to create a virtual device with an IOMMU and expose it to the virtual machine, enabling direct memory access (DMA) operations while leaving unencrypted memory pages untouched, thereby determining encryption status without modifying the guest OS.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If para-virtualization modifications are made to the guest operating system to track encryption status, then the hypervisor can identify encrypted memory pages, but the guest operating system complexity increases and potential memory corruption risks arise
Solution Approach 1:
The patent segments the memory management functionality by introducing a separate IOMMU component that handles encryption status tracking independently from the guest operating system. The IOMMU maintains its own page tables and encryption status information, dividing the complex task of encrypted memory management into distinct functional modules that operate autonomously without requiring guest OS modifications.
Solution Approach 2:
The IOMMU acts as an intermediary between the guest virtual memory system and the host physical memory system. It mediates memory access requests by translating guest virtual addresses to host physical addresses while simultaneously tracking encryption status, thereby eliminating the need for the guest operating system to directly manage or know about encryption states.
2Reliability
If memory pages are decrypted and re-encrypted with address-dependent keys, then data security is maintained, but guest memory corruption may occur
Solution Approach 1:
The system performs preliminary encryption status tracking by maintaining encryption state information in the IOMMU page tables before any memory access or decryption operations occur. This advance preparation allows the system to identify which pages are encrypted and handle them appropriately without requiring runtime decryption and re-encryption operations that could corrupt guest memory.
Solution Approach 2:
The IOMMU creates and maintains a copy of the page table structure that includes encryption status information alongside address translation mappings. This duplicate structure allows the system to track encryption states without modifying the actual guest memory contents or the guest operating system's view of its memory, thereby preventing corruption while maintaining security.
3Measurement precision
If the hypervisor directly manages encrypted memory pages, then encryption status can be tracked, but system performance decreases due to additional processing overhead
Solution Approach 1:
The IOMMU performs self-service by autonomously tracking and managing its own encryption status information through its internal page tables. It independently determines which memory pages are encrypted based on its own mappings without requiring the hypervisor to intervene in each memory access decision, thereby reducing processing overhead while maintaining accurate encryption status tracking.
Solution Approach 2:
The patent adds a new dimension to memory management by incorporating encryption status as an additional attribute in the IOMMU page table structure. Rather than requiring the hypervisor to process and track encryption states as a separate management task, the encryption dimension is integrated into the existing address translation mechanism, allowing both functions to occur simultaneously without performance penalty.
Data Source
AI summary
Systems and methods for memory management for virtual machines. An example method may include creating, by a hypervisor running on a host computer system, a virtual device associated with a virtual machine managed by the hypervisor. The virtual device may include a virtual input/output memory management unit (IOMMU). The method may further include appending, by a driver of the virtual device, a plurality of page table entries to a page table of the virtual IOMMU, wherein each page table entry of the plurality of page table entries references unencrypted memory pages used by the virtual machine. Responsive to receiving a memory access request with respect to a memory page, the hypervisor may determine, using the page table of the virtual IOMMU, whether the memory page is encrypted.


