Virtual APIC Register Consolidation for Inter-vCPU Interrupts

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for implementing inter-virtual processor interrupts in virtual machines require multiple operations on the advanced programmable interrupt controller (APIC), leading to frequent virtual machine exits (VM-Exits) and decreased performance due to frequent context switching.

Innovation Solution

A method that writes register data containing information about the target vCPU and indication data into a virtual register of a virtual advanced programmable interrupt controller (vAPIC) of the source vCPU, allowing the virtual machine monitor to inject an inter-vCPU interrupt with only one operation on the vAPIC, reducing the number of VM-Exits.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If multiple operations on the APIC are performed to implement an interrupt, then the interrupt can be properly delivered to the target vCPU, but the number of VM-Exits increases and performance deteriorates

Engineering Contradiction:
Improveinterrupt delivery accuracyVSAvoidvirtual machine performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent merges multiple APIC operations (reading delivery status, writing target vCPU identifier to high-order register, writing indication data to low-order register) into a single unified operation. The register data structure combines both the target vCPU identifier and indication data into one write operation to the vAPIC, reducing the number of VM-Exits from three to one while maintaining reliable interrupt delivery.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent performs preliminary packaging of all necessary interrupt information (target vCPU identifier and indication data) into a single register data structure before the VM-Exit. This preliminary action ensures that when the VM-Exit occurs, the VMM has all the information needed to complete the interrupt delivery in a single operation, avoiding multiple subsequent VM-Exits.

Inventive Principle:
Principle #10Preliminary action

2Adaptability or versatility

If frequent interrupts are handled using the traditional APIC access method, then all interrupt types can be supported, but the frequency of VM-Exits increases and system efficiency decreases

Engineering Contradiction:
Improveinterrupt type supportVSAvoidsystem efficiency
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent creates a universal register data structure that can handle multiple interrupt types (IPIs, load balancing, and other interrupts) through a single unified interface. The register data format is designed to be multi-functional, accommodating different interrupt scenarios while always requiring only one APIC operation, thus maintaining versatility without sacrificing efficiency.

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

Data Source

PatentEP2881860B1Method for implementing an interrupt between virtual processors, related device, and system
Publication Date: 2017.11.01 HUAWEI TECH CO LTD
  • EP2881860B1 patent drawingFigure 1~2
  • EP2881860B1 patent drawingFigure 3~4
  • EP2881860B1 patent drawingFigure 5~6

AI summary

Embodiments of the present invention disclose a method for implementing an inter-virtual processor interrupt, including: when a source virtual processor needs to trigger an interrupt to a target virtual processor, writing register data that includes information about the target virtual processor and indication data used to indicate that the source virtual processor triggers the interrupt to the target virtual processor into a virtual register of a virtual advanced programmable interrupt controller vAPIC of the source virtual processor, so that a virtual machine monitor obtains the information about the target virtual processor and the indication data from the virtual register by means of parsing, and the virtual machine monitor injects an inter-virtual processor interrupt into the target virtual processor according to the information about the target virtual processor and the indication data. Accordingly, the embodiments of the present invention further provide a related virtual machine, a virtual controller, a computing node, and a system. The embodiments of the present invention may improve performance of a virtual machine.