Hypervisor MMIO Instruction Decoding Overhead Reduction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In virtualized environments, executing memory-mapped input/output (MMIO) instructions by a guest operating system incurs high overhead due to computationally expensive instruction retrieval and decoding operations, as the hypervisor typically re-executes page walks and decoding to identify MMIO instructions and parameters.

Innovation Solution

A hypervisor system that receives an MMIO address exit from a guest, walks the guest page table to identify the associated address, decodes the instruction, and records the operation type and MMIO information in the host page table, allowing the hypervisor to execute the operation on behalf of the guest with reduced overhead by avoiding subsequent expensive decoding operations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If the hypervisor re-executes page walks and performs instruction retrieval and decoding operations to identify MMIO instructions, then the hypervisor can accurately identify MMIO instructions and parameters, but the processing time and computational overhead increase significantly

Engineering Contradiction:
Improveaccuracy of MMIO instruction identificationVSAvoidprocessing time for MMIO execution
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent applies preliminary action by pre-walking the page table and pre-decoding instructions during guest address translation, storing the results in advance. When an MMIO operation is needed, the hypervisor retrieves pre-computed information from the page table rather than re-executing the expensive page walk and instruction decoding operations, thus resolving the contradiction between accurate identification and processing time.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If the hypervisor performs comprehensive page table walking and instruction decoding to ensure accurate MMIO operation identification, then the reliability of MMIO execution is improved, but the device complexity and computational overhead increase

Engineering Contradiction:
Improvereliability of MMIO executionVSAvoidcomplexity of hypervisor processing
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies copying by creating and storing copies of page table entries and instruction decoding results in the host page table structure. Instead of repeatedly performing complex page walks and instruction decoding, the hypervisor copies relevant information (guest address, MMIO address, operation type, parameters) into pre-computed page table entries, maintaining reliability while reducing the complexity of repeated processing.

Inventive Principle:
Principle #26Copying

3Measurement precision

If the hypervisor accesses guest memory and performs detailed page table analysis to identify MMIO instructions, then the precision of parameter extraction is improved, but the processing overhead and time consumption increase

Engineering Contradiction:
Improveprecision of parameter extractionVSAvoidthroughput of MMIO operations
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent applies preliminary action by performing page table walking and instruction parameter extraction in advance during address translation, storing the extracted parameters (operands, memory addresses, operation types) in the page table structure. When MMIO execution is required, the hypervisor directly retrieves pre-extracted parameters without re-accessing guest memory or re-performing analysis, thus maintaining precision while improving throughput.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9916173B2Facilitating execution of MMIO based instructions
Publication Date: 2018.03.13 RED HAT ISRAEL
  • US9916173B2 patent drawing
  • US9916173B2 patent drawing
  • US9916173B2 patent drawing

AI summary

A hypervisor of a host receives an indication of an exit from a guest to the hypervisor and a memory-mapped input output (MMIO) address that caused the exit to hypervisor. The hypervisor walks a page table of the guest to identify a guest address associated with the MMIO address that caused the exit to the hypervisor. The hypervisor decodes an instruction of the guest referenced by the guest address to determine a type of operation that the guest intended to execute and a location of MMIO information. The hypervisor records, in a page table entry for the MMIO address of a host page table, an association with the type of operation and the location of the MMIO information. The hypervisor executes the operation on behalf of the guest based on the type of the operation and the MMIO information.