Pre-allocating SR-IOV Page Table Entries for Nested VMs
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Nested virtual machines may not have access to the SR-IOV capabilities of PCI devices, as virtual functions are created after the physical function driver is loaded, and page tables for virtual functions are not created, preventing top-level virtual machines from accessing memory needed to enable or disable virtual functions.
Innovation Solution
Pre-allocating page table entries for the maximum number of virtual functions executable by the physical function of an SR-IOV enabled PCI device within the IOMMU, allowing virtual machines to be aware of potential virtual functions and request their creation, thereby enabling access to SR-IOV capabilities.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If virtual functions are created after the physical function driver is loaded, then the system follows standard initialization sequence, but nested virtual machines cannot access SR-IOV capabilities because page tables for virtual functions are not created
Solution Approach 1:
The patent pre-creates page table entries for virtual functions during the physical function driver loading phase, before nested virtual machines are initialized. This preliminary action ensures that when nested VMs later request SR-IOV capabilities, the necessary page tables already exist, enabling reliable access without requiring dynamic page table creation during runtime.
2Quantity of substance
If page tables are created dynamically when virtual functions are needed, then memory is used efficiently, but nested virtual machines cannot access the necessary memory to enable or disable virtual functions
Solution Approach 1:
Page table entries are pre-allocated during driver initialization rather than created dynamically when needed. This preliminary allocation ensures that memory addresses for virtual functions are available before nested VMs attempt to access them, while the actual page table structures remain compact and efficient in size.
Solution Approach 2:
The patent introduces an intermediary mechanism where the host hypervisor pre-creates page table entries that bridge the gap between the physical function driver and nested virtual machines. These pre-created entries act as intermediaries that allow nested VMs to access SR-IOV capabilities without requiring the page tables to be dynamically created at the moment of access.
3Adaptability or versatility
If the system supports nested virtual machines with SR-IOV access, then virtualization flexibility is improved, but memory access latency increases without pre-allocation
Solution Approach 1:
By pre-creating page table entries during driver loading, the system eliminates the need for runtime page table creation when nested VMs request SR-IOV capabilities. This preliminary action reduces memory access latency by ensuring that all necessary page tables are already in place, allowing nested VMs to immediately access virtual functions without delay.
Data Source
AI summary
Page table entries for a maximum number of virtual functions configurable by a physical function of a single root input-output virtualization (SR-IOV) device can be pre-allocated to provide access for nested virtual machines and containers. For example, a computing device can allocate, by an input-output memory management unit (IOMMU), a page table comprising page table entries to a physical function executed by an SR-IOV device. The number of page table entries can be the maximum number of virtual functions that are configurable by the physical function. A virtual IOMMU executing in a virtual machine deployed by the computing device can map a virtual page table comprising virtual page table entries to the page table comprising page table entries. The virtual machine can assign a virtual function using a virtual page table entry. The virtual page table entry can include a function number and a virtual memory address.


