APIC Virtualization Mapping for Fewer VM Exits in Multi-vCPU VMs

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing APIC virtualization systems are limited by a small number of mapping entries, leading to unpredictable behavior or complete disabling, which affects computing performance and resource utilization in virtual machines.

Innovation Solution

Implementing a cooperative APIC (CAPIC) virtualization that uses a vCPU ID bit and a shared page to dynamically manage APIC table entries, allowing virtual machines to determine if APIC virtualization can handle interrupt requests without triggering VM exits, and rescheduling vCPUs as needed to maintain efficient interrupt coordination.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If APIC virtualization is enabled with a limited number of mapping entries, then interrupt handling performance is improved by avoiding VM exits, but the system becomes unstable and unpredictable when the number of processors exceeds the available mapping entries

Engineering Contradiction:
Improveinterrupt handling performanceVSAvoidsystem stability
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent implements dynamic management of APIC virtualization mappings through a hypervisor that maintains a shared page with the VM. The system dynamically determines whether to use APIC virtualization or VM exits based on current processor availability and mapping entry status, allowing the interrupt handling mechanism to adapt its behavior rather than being static. This resolves the contradiction by making the system flexible enough to handle both performance-critical scenarios and edge cases where processor count exceeds mapping entries.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent introduces a shared page as an intermediary data structure between the hypervisor and the VM. This shared page contains mapping information that enables the VM to determine whether APIC virtualization can be used without triggering a VM exit. The intermediary mechanism allows the system to safely evaluate processor availability and mapping entry status before attempting APIC virtualization, preventing the unpredictable behavior that occurs when processor count exceeds mapping entries.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If the number of processors exceeds the available mapping entries in the APIC table, then system coverage is improved, but frequent VM exits occur consuming significant computing resources

Engineering Contradiction:
Improveprocessor scalabilityVSAvoidcomputing resource consumption
Core Design Contradiction:
Adaptability or versatilityVSLoss of energy

Solution Approach 1:

The patent implements preliminary checking of processor availability and mapping entry status before attempting to handle interrupts through APIC virtualization. The shared page contains pre-computed mapping information that allows the VM to determine in advance whether APIC virtualization can be used. This preliminary action prevents unnecessary VM exits by identifying suitable processors before interrupt handling begins, resolving the contradiction between processor scalability and computing resource consumption.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent establishes a feedback mechanism where the shared page continuously reflects the current state of APIC table mappings and processor availability. The VM uses this feedback information to make informed decisions about interrupt handling strategies. When the number of processors exceeds mapping entries, the feedback mechanism guides the system to use VM exits only when necessary, optimizing the balance between processor scalability and computing resource consumption.

Inventive Principle:
Principle #23Feedback

3Reliability

If APIC virtualization is completely disabled to avoid unpredictable behavior, then system reliability is improved, but performance deteriorates due to frequent VM exits

Engineering Contradiction:
Improvesystem reliabilityVSAvoidcomputing performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies local quality by enabling APIC virtualization selectively for specific interrupt handling scenarios rather than globally disabling it. The shared page contains mapping information that identifies which processors and mapping entries are suitable for APIC virtualization. This localized approach allows the system to maintain high performance for compatible interrupt handlers while ensuring reliability for cases where processor count exceeds mapping entries, resolving the contradiction between system reliability and computing performance.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent changes the parameter of interrupt handling strategy from a fixed disabled state to a dynamically selected state based on shared page information. The system modifies its behavior by checking mapping entry availability and processor status before selecting between APIC virtualization and VM exits. This parameter change enables the system to achieve both reliability and performance by adapting the interrupt handling mechanism to current system conditions.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS12613726B2Dynamically enabling advanced programmable interrupt controller virtualization capabilities for virtual machines
Publication Date: 2026.04.28 RED HAT INC
  • US12613726B2 patent drawing
  • US12613726B2 patent drawing
  • US12613726B2 patent drawing

AI summary

Advanced programmable interrupt controller (APIC) virtualization capabilities can be dynamically enabled for virtual machines (VMs). In one example, a VM executing in a computing device can determine that an interrupt request executed by a particular virtual central processing unit (vCPU) for the VM will involve a virtualization exit. The vCPUs allocated to the VM can be mapped to processors in entries of an APIC table for an APIC virtualization. In response, the virtual machine can access a shared page including a copy of the APIC table and a maximum entry number for the APIC table. The virtual machine can determine that an identification number of a particular processor mapped to the particular vCPU in the copy of the APIC table is less than the maximum entry number. In response, the computing device can execute an interrupt procedure for the interrupt request using the APIC virtualization without triggering the virtualization exit.