Redirection Apparatus Virtualization I/O Exception Handling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In virtualization systems, the overheads generated from frequent mode switching between virtual machines, virtual machine monitors, kernel modes, and user modes affect the I/O performance.

Innovation Solution

A computer device with a redirection apparatus that switches from a virtualization privilege level of a virtual machine to a user mode of the host, allowing for direct execution of exception processing functions in the user mode, thereby reducing switching overheads.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If synchronous processing is used for virtual I/O operations, then the VM can complete I/O operations through exception instructions, but multiple mode switching overheads are generated between VM-VMM and kernel-mode-user-mode

Engineering Contradiction:
ImproveI/O processing capabilityVSAvoidswitching overhead time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent extracts the exception processing function from the traditional kernel-mode VMM and relocates it to user-mode. By taking out the exception handling mechanism from the kernel-mode context and implementing it in user-mode, the system eliminates the need for frequent kernel-mode-user-mode switching during I/O operations, thereby reducing switching overheads while maintaining I/O processing capability.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces a user-mode exception processing function as an intermediary between the VM and the host kernel. This intermediary layer handles exception instructions in user-mode, avoiding direct kernel-mode involvement and subsequent mode switching. The user-mode exception processing function acts as a mediator that processes I/O operations without requiring repeated transitions between different privilege levels.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If asynchronous processing is used for virtual I/O operations, then I/O operations can be completed without blocking the VM, but frequent switching between user mode and kernel mode is required

Engineering Contradiction:
ImproveI/O processing throughputVSAvoidmode switching complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent extracts the asynchronous I/O processing logic from the kernel-mode interrupt handler and implements it in user-mode. By taking out the interrupt processing function and moving it to user-mode, the system eliminates the need for frequent kernel-mode-user-mode switching during asynchronous operations, reducing mode switching complexity while maintaining high I/O processing throughput.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent enables the user-mode exception processing function to handle I/O operations independently without requiring continuous kernel-mode intervention. The user-mode processing function can autonomously manage interrupt requests and complete I/O operations, reducing the complexity of coordinated mode switching between user and kernel modes.

Inventive Principle:
Principle #25Self-service

3Reliability

If traditional exception processing is used, then exception instructions can be processed through VMM, but switching overheads affect I/O performance

Engineering Contradiction:
Improveexception processing reliabilityVSAvoidI/O performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts the exception processing function from the kernel-mode VMM and relocates it to user-mode. This extraction maintains the reliability of exception processing by preserving the necessary processing logic, while simultaneously improving I/O performance by eliminating frequent kernel-mode-user-mode switching overheads.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent changes the execution environment parameter of the exception processing function from kernel-mode to user-mode. By changing the privilege level parameter where exception processing occurs, the system maintains processing reliability while reducing the overhead associated with mode switching, thereby improving overall I/O performance.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentEP4195020B1Computer device, exception processing method and interrupt processing method
Publication Date: 2025.02.19 HUAWEI TECH CO LTD
  • EP4195020B1 patent drawingFigure 1
  • EP4195020B1 patent drawingFigure 2
  • EP4195020B1 patent drawingFigure 3

AI summary

A computer device is disclosed. In a virtualization I/O procedure, a redirection apparatus in a processor is used to implement privilege level switching in a synchronization processing procedure, to directly switch from a virtualization privilege level of a VM to a user mode of a host, and perform corresponding exception processing. In an asynchronous processing procedure, an interrupt request may be asynchronously transferred by using a virtual event notification apparatus and an interrupt controller in the processor without passing through a kernel mode of the host. In both of a synchronous processing procedure and the asynchronous processing procedure of the device, overheads generated during switching are reduced, and performance of the computer device is improved.