Virtual IOMMU Nested Page Tables Guest VM Memory Isolation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In virtual machine environments, peripheral devices and their drivers have unfettered access to memory, leading to potential system crashes due to memory corruption, and existing solutions are either ineffective or too slow to prevent improper memory access.

Innovation Solution

A virtualized IOMMU is implemented within a guest VM, utilizing a guest page table and a host page table, along with a GCR3 table indexed by a virtual DeviceID, to create a hardware-supported firewall that enforces proper memory access and isolation, ensuring rapid input/output responses.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a virtualized IOMMU is implemented within a guest VM to prevent improper memory access, then system stability and security are enhanced, but device complexity increases

Engineering Contradiction:
Improvesystem stabilityVSAvoidIOMMU structure
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent implements a nested page table structure where a guest page table (first level) and a host page table (second level) are combined within the virtualized IOMMU. The guest page table translates device virtual addresses to intermediate addresses, which are then translated by the host page table to final physical addresses. This nested structure enables fine-grained memory access control and isolation while maintaining system stability, directly resolving the contradiction between enhanced reliability and increased device complexity.

Inventive Principle:
Principle #7Nested doll (Nesting)

2Reliability

If a virtualized IOMMU with nested page tables is implemented to enforce memory access control, then memory security is improved, but input/output response speed decreases

Engineering Contradiction:
Improvememory securityVSAvoidI/O response speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The patent pre-configures the nested page table structures (guest page table and host page table) within the virtualized IOMMU before memory access operations occur. The translation mappings are established in advance through programmatic configuration, allowing the IOMMU to perform rapid address translation during runtime without requiring complex runtime validation. This preliminary setup enables both strong memory security control and fast I/O response, resolving the contradiction between security and speed.

Inventive Principle:
Principle #10Preliminary action

3Ease of operation

If peripheral devices are given unfettered access to memory, then ease of operation is improved, but system stability deteriorates due to memory corruption

Engineering Contradiction:
Improvedevice access freedomVSAvoidsystem stability
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent introduces the virtualized IOMMU as an intermediary component between peripheral devices and system memory. The IOMMU intercepts memory access requests from devices, translates their virtual addresses through the nested page tables, and enforces access control policies. This intermediary structure allows devices to operate with simplified virtual address interfaces (ease of operation) while the IOMMU simultaneously enforces strict memory isolation and protection (system stability), preventing memory corruption from unauthorized or erroneous device accesses.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentEP2891067B1Virtual input/output memory management unit wihtin a guest virtual machine
Publication Date: 2019.02.27 ADVANCED MICRO DEVICES INC
  • EP2891067B1 patent drawingFigure 1
  • EP2891067B1 patent drawingFigure 2
  • EP2891067B1 patent drawingFigure 3

AI summary

A virtual input/output memory management unit (IOMMU) is configured to provide a firewall around memory requests associated with an input/output (I/O) device. The virtual IOMMU uses data structures including a guest page table, a host page table and a general control register (i.e., GCR3) table. The guest page table is implemented in hardware to support the speed requirements of the virtual IOMMU. The GCR3 table is indexed using a virtual DeviceID parameter stored in a device table.