Software IOMMU Emulator for Interrupt Remapping

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In virtualization contexts, peripheral devices with direct memory access (DMA) capabilities cannot raise interrupts effectively in guest virtual machines due to lack of hardware-based virtualization of the input/output memory management unit (IOMMU), as guest VMs are unaware of host-physical memory addresses used for interrupt handling.

Innovation Solution

Implement software-based interrupt remapping, allowing virtual machine guests to access peripheral devices by mapping virtual memory addresses to physical addresses, even on host machines lacking hardware-based IOMMU virtualization, such as x86-based devices without AMD-Vi or INTEL VT-d, or ARM-based devices without SMMU.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If hardware-based IOMMU virtualization is used, then interrupt handling efficiency is improved, but device compatibility and accessibility are worsened due to lack of support on older hosts

Engineering Contradiction:
Improveinterrupt handling efficiencyVSAvoidhost compatibility
Core Design Contradiction:
SpeedVSAdaptability or versatility

Solution Approach 1:

The patent introduces a software-based IOMMU emulator that acts as an intermediary layer between the guest VM and the host hardware. This emulator runs in the host operating system and intercepts IOMMU-related operations, translating them into appropriate host commands. For interrupt handling, the emulator captures interrupt requests from guest devices, translates the guest physical addresses to host physical addresses using maintained mappings, and routes them to the appropriate host interrupt handlers, thereby enabling interrupt functionality on hosts without hardware IOMMU support.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent creates a software copy of the IOMMU functionality that replicates the behavior of hardware-based IOMMU. The software emulator maintains address translation tables and mapping structures similar to hardware IOMMU, implementing the same interrupt remapping and address translation logic in software. This copying approach allows guests to operate as if hardware IOMMU is present, while the software implementation provides broader host compatibility.

Inventive Principle:
Principle #26Copying

2Adaptability or versatility

If software-based interrupt remapping is implemented, then host compatibility is improved, but system complexity increases due to additional software layers

Engineering Contradiction:
Improvehost compatibilityVSAvoidsoftware layer complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The software IOMMU emulator is designed to provide multiple functions within a single unified component. It handles address translation for DMA operations, manages interrupt remapping, maintains device-to-memory mappings, and provides configuration interfaces for guest devices. By consolidating these diverse functions into one multi-functional software module, the patent reduces the need for separate complex components while achieving broad host compatibility across different architectures.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The software emulator implements self-service mechanisms by automatically maintaining address translation tables and mapping structures based on device configurations. When a guest device is assigned to a VM, the emulator autonomously creates the necessary mappings and updates its internal state without requiring manual intervention or complex external coordination. This self-management capability reduces the operational complexity despite the additional software layer.

Inventive Principle:
Principle #25Self-service

3Speed

If direct memory access is enabled for guest VMs, then device access speed is improved, but security and stability are worsened due to potential unauthorized access

Engineering Contradiction:
Improvedevice access speedVSAvoidsystem security
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

The software IOMMU emulator serves as a security intermediary that sits between guest devices and host memory resources. It intercepts all DMA requests from guest devices, validates them against maintained permission and mapping tables, and only allows access to authorized memory regions. For interrupt requests, the emulator verifies that the interrupt source is legitimate and the target handler is properly configured before routing the interrupt. This intermediary layer enables fast direct access while preventing unauthorized or malicious access attempts.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The software emulator implements feedback mechanisms by continuously monitoring DMA and interrupt operations, comparing them against configured security policies and mapping tables. When a guest device attempts an operation, the emulator checks the request against the maintained mappings and permissions, providing immediate feedback by allowing or blocking the operation. This real-time feedback loop ensures that direct memory access remains secure while maintaining performance for authorized operations.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS10922253B1Implementing interrupt remapping via input/output memory management unit faults
Publication Date: 2021.02.16 VMWARE INC
  • US10922253B1 patent drawing
  • US10922253B1 patent drawing
  • US10922253B1 patent drawing

AI summary

Disclosed are various embodiments for software-based interrupt remapping. A memory address for a respective interrupt request of the peripheral device is allocated. The peripheral device is then configured to write to the memory address to raise an interrupt with the processor. Later, it can be determined that the peripheral device has attempted to write to the memory address. In response, an interrupt can be raised for the respective interrupt request with the processor of the computing device on behalf of the peripheral device.