Memory Paging With VMM-Based IOMMU Page Table Replacement
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing IOMMU systems that do not support Page fault functionality face challenges in performing page table replacement, necessitating a method to efficiently update page tables without relying on Page fault mechanisms.
Innovation Solution
A memory paging method involving a virtual machine manager (VMM) that determines guest physical addresses needing updates, identifies corresponding host physical addresses, copies data to idle physical addresses, and updates the page table entries in the IOMMU to implement page table replacement.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If Page fault function is used for page table replacement, then page table replacement can be achieved, but it requires IOMMU to support Page fault function which limits device compatibility
Solution Approach 1:
The VMM acts as an intermediary between the IOMMU and the memory system. Instead of relying on the IOMMU's Page fault function, the VMM manually performs page table replacement by copying data between physical addresses and updating the page table entries, thus mediating the memory management process for IOMMUs without Page fault support
Solution Approach 2:
The patent uses data copying as a core mechanism for page table replacement. The VMM copies data from the source physical address to the destination physical address, then updates the page table to point to the new location. This copying approach replaces the need for Page fault functionality while achieving the same memory management goal
2Adaptability or versatility
If manual page table update is performed for IOMMU without Page fault support, then device compatibility is improved, but the complexity of memory management increases
Solution Approach 1:
The system performs self-service memory management by automatically identifying pages that need replacement, selecting appropriate replacement pages, copying data, and updating page tables without external intervention. The VMM autonomously manages the entire page replacement process, reducing the operational burden despite the increased complexity
3Adaptability or versatility
If page table replacement is implemented without Page fault function, then it works for all IOMMUs, but the automation level of memory management decreases
Solution Approach 1:
The system performs preliminary actions by pre-allocating idle physical addresses and pre-copying data before the actual page table update is needed. The VMM proactively manages memory pages, identifying replacement candidates and preparing data transfers in advance, which maintains a high level of automation despite the manual update process
Data Source
AI summary
A memory paging method and system, and a storage medium are provided. In the embodiments of the present application, for an IOMMU which does not support Page fault, a VMM may determine a GPA needing page update, and determine a first HPA corresponding to the GPA from a page table stored in the IOMMU of a host; determine a second HPA for replacing the first HPA from idle physical addresses stored in a host memory; further, copy data stored in the first HPA to the second HPA; and update a HPA that corresponds to the GPA needing update and is recorded in the page table of the IOMMU to the second HPA, and thus, page table replacement is implemented for the IOMMU which does not support Page fault.

