Page Fault-Based MMIO for Virtual Machines

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In virtualization systems, page fault-based memory-mapped I/O (MMIO) operations for virtual machines are inefficient due to computationally expensive page table lookups and large hypervisor data structures, leading to slow processing times and overhead in accessing virtual devices.

Innovation Solution

By marking page table entries associated with MMIO-based memory spaces as valid and read-only, allowing the host CPU to cache address translations in a translation lookaside buffer (TLB) and enabling the hypervisor to perform lookups in a smaller data structure, reducing the overhead of page table walks and data structure lookups.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If page table entries for MMIO addresses are marked as invalid or reserved, then guest direct access to virtual device memory space is prevented, but computationally expensive page table walks must be re-executed on each access

Engineering Contradiction:
Improveprevention of guest direct access to virtual device memoryVSAvoidprocessing time for page table walks
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent performs preliminary action by marking page table entries as valid and read-only during system initialization rather than invalid during runtime. This allows the CPU to cache translations in the TLB, avoiding repeated expensive page table walks while still preventing guest writes through the read-only protection. The hypervisor receives page fault notifications only when necessary, maintaining both security and performance.

Inventive Principle:
Principle #10Preliminary action

2Ease of operation

If the hypervisor executes lookup in a large data structure containing all virtual devices, then device identification can be performed, but the lookup process becomes relatively computationally expensive

Engineering Contradiction:
Improvedevice identification capabilityVSAvoidlookup speed
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent applies segmentation by dividing the large hypervisor data structure into smaller subsets based on memory regions. Instead of searching through all virtual device entries, the hypervisor only needs to search relevant subsets corresponding to the specific memory region being accessed. This significantly reduces lookup time while maintaining complete device identification capability.

Inventive Principle:
Principle #1Segmentation

3Adaptability or versatility

If blocks of guest addresses are reserved for I/O devices, then virtual device accommodation is enabled, but address space available for guest physical memory is reduced

Engineering Contradiction:
Improvevirtual device accommodationVSAvoidguest physical memory address space
Core Design Contradiction:
Adaptability or versatilityVSArea of stationary object

Solution Approach 1:

The patent applies local quality by making page table entries for MMIO regions read-only rather than completely invalid or reserved. This allows the guest OS to read from these regions (enabling device accommodation) while preventing writes that would compromise system integrity. The read-only attribute provides fine-grained control that accommodates virtual devices without completely blocking address space usage.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS9846610B2Page fault-based fast memory-mapped I/O for virtual machines
Publication Date: 2017.12.19 RED HAT ISRAEL
  • US9846610B2 patent drawing
  • US9846610B2 patent drawing
  • US9846610B2 patent drawing

AI summary

Implementations provide for page fault-based fast memory-mapped I/O for virtual machines. A method of the disclosure includes detecting, by a processing device executing a hypervisor on a host machine, a protection fault at the hypervisor, the protection fault caused by a guest of the hypervisor attempting to write to an address marked as valid and read-only in a host page table entry at the hypervisor, the address associated with memory-mapped input-output (MMIO) for a virtual device of the guest, referencing, by the processing device, a MMIO data structure of the hypervisor with the address that caused the protection fault, identifying, by the processing device, the virtual device and a MMIO-based instruction mapped to the address in the MMIO data structure at the hypervisor, and executing, by the processing device, the MMIO instruction at the hypervisor on behalf of the guest.