IOMMU Reverse Map Table for VM Memory Access Control

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Hypervisors in computing devices may fail to properly enforce access controls, leading to potential data breaches by allowing virtual machines to access incorrect or unauthorized memory areas, due to incorrect address translations provided by the hypervisor.

Innovation Solution

A reverse map table is implemented to ensure that system physical addresses are properly mapped to guest physical addresses, with checks performed by the IO table walker to verify the validity of these mappings and prevent unauthorized access, and a modified Address Translation Caching (ATC) scheme is used to provide only partial address translation information to IO devices, ensuring that only valid translations are used for memory access.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If the hypervisor provides address translations to enable IO devices to access memory pages allocated to virtual machines, then memory access functionality is improved, but security deteriorates because the hypervisor may provide incorrect address information allowing unauthorized access

Engineering Contradiction:
Improvememory access functionalityVSAvoidaccess control security
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

An Input-Output Memory Management Unit (IOMMU) is introduced as an intermediary component between IO devices and memory. The IOMMU performs address translation for IO devices independently of the hypervisor, using its own address translation tables. This mediator prevents the hypervisor from directly controlling IO device memory access, thereby maintaining security even if the hypervisor provides incorrect address information.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The address translation functionality is segmented into separate components: the hypervisor maintains nested page tables for virtual machine memory management, while the IOMMU maintains separate address translation tables specifically for IO device accesses. This segmentation isolates the security-critical IO device access control from the potentially compromised hypervisor address translation.

Inventive Principle:
Principle #1Segmentation

2Device complexity

If the hypervisor directly controls address translations for virtual machines and IO devices, then system complexity is reduced, but reliability deteriorates due to potential hypervisor corruption or malicious code

Engineering Contradiction:
Improveaddress translation system complexityVSAvoidaccess control enforcement
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The address translation system is divided into separate hierarchical structures: nested page tables for virtual machine memory management and separate address translation tables in the IOMMU for IO device access control. This segmentation allows independent verification and validation of each translation path, improving reliability without excessive complexity.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The IOMMU pre-establishes address translation tables that map IO device addresses to specific memory pages allocated to virtual machines. These translation tables are configured in advance with proper access controls, allowing the IOMMU to enforce security policies before any potential malicious or erroneous hypervisor actions can occur.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If address translation caching is implemented to improve IO device performance, then productivity is improved, but security deteriorates because cached translations may be stale or incorrect

Engineering Contradiction:
ImproveIO device access speedVSAvoidtranslation accuracy
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The IOMMU implements a feedback mechanism where address translation entries in the cache are validated against the current state of address translation tables. When the hypervisor modifies memory allocations or address mappings, the IOMMU receives notifications and updates its translation tables accordingly, ensuring cached translations remain accurate and secure.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The IOMMU pre-validates and caches address translations only after verifying they correspond to properly allocated memory pages with appropriate access permissions. This preliminary validation ensures that cached translations are correct before being used for performance-critical IO device accesses.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10509736B2Controlling access by IO devices to pages in a memory in a computing device
Publication Date: 2019.12.17 ADVANCED MICRO DEVICES INC
  • US10509736B2 patent drawing
  • US10509736B2 patent drawing
  • US10509736B2 patent drawing

AI summary

An input-output (IO) memory management unit (IOMMU) uses a reverse map table (RMT) to ensure that address translations acquired from a nested page table are correct and that IO devices are permitted to access pages in a memory when performing memory accesses in a computing device. A translation lookaside buffer (TLB) flushing mechanism is used to invalidate address translation information in TLBs that are affected by changes in the RMT. A modified Address Translation Caching (ATC) mechanism may be used, in which only partial address translation information is provided to IO devices so that the RMT is checked when performing memory accesses for the IO devices using the cached address translation information.