Virtual Machine Interrupt Handling via Masking and Injection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In a virtualized environment, level triggered interrupts generated by devices assigned to virtual machines can continuously interrupt the host machine while waiting for the guest operating system to service them, leading to system instability and the need for restrictive timing constraints to prevent continuous interruptions.

Innovation Solution

A system and method that includes an interrupt handler with an inject module, a mask module, and an access module to receive and mask interrupts, inject them into the virtual machine, and unmask them based on the virtual machine's attempt to access the device, allowing for platform-independent handling of interrupts without relying on chipset emulation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the device asserts a level triggered interrupt and the host operating system does not clear it, then the interrupt signal remains high and continuously re-interrupts the processor, but this leads to system instability and excessive interruptions

Engineering Contradiction:
Improvesystem stabilityVSAvoidinterrupt frequency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent introduces a virtualization layer as an intermediary between the physical device and the host operating system. This layer captures interrupts from assigned devices and injects them into virtual machines, preventing continuous re-interruption of the host while maintaining proper interrupt handling. The virtualization layer acts as a mediator that translates physical device interrupts into virtual machine interrupts, resolving the contradiction between system stability and interrupt frequency.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent segments the interrupt handling responsibility by separating host OS interrupt handling from guest OS interrupt handling. Through device assignment, specific devices are dedicated to virtual machines, and their interrupts are routed directly to the appropriate virtual machine rather than being handled by the host OS. This segmentation prevents host OS from being continuously interrupted while allowing guest OS to handle interrupts properly.

Inventive Principle:
Principle #1Segmentation

2Ease of operation

If the host operating system directly controls interrupt handling for assigned devices, then it can service the interrupt, but it loses control when the device is assigned to a virtual machine and cannot identify or service the interrupt

Engineering Contradiction:
Improveinterrupt handling controlVSAvoidvirtual machine compatibility
Core Design Contradiction:
Ease of operationVSAdaptability or versatility

Solution Approach 1:

The virtualization layer serves as an intermediary that bridges the gap between host OS and virtual machine for interrupt handling. It captures interrupts from assigned devices and injects them into the appropriate virtual machine, enabling the virtual machine to handle interrupts as if it had direct control. This resolves the contradiction by allowing the virtual machine to have full control over its assigned device interrupts while the host OS maintains overall system control through the virtualization layer.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If restrictive timing constraints are imposed to prevent continuous interruptions, then system stability is maintained, but this adds complexity and limits system flexibility

Engineering Contradiction:
Improvesystem stabilityVSAvoidtiming constraint management
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The virtualization layer acts as an intermediary that eliminates the need for restrictive timing constraints by properly routing interrupts to the virtual machine that owns the device. Since the virtual machine can handle interrupts at its own pace without causing continuous re-interruptions to the host, the system maintains stability without imposing artificial timing limits, thereby reducing complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS9069741B2Emulating level triggered interrupts of physical devices assigned to virtual machine
Publication Date: 2015.06.30 RED HAT INC
  • US9069741B2 patent drawing
  • US9069741B2 patent drawing
  • US9069741B2 patent drawing

AI summary

Systems and methods are disclosed for handling a level triggered interrupt generated by a device assigned to a virtual machine running on a host machine. An example system includes a host machine that hosts a virtual machine and a device coupled to the host machine. The device is assigned to the virtual machine and generates one or more interrupts. The example system also includes an interrupt handler that receives an interrupt generated by the device, masks the interrupt, injects the interrupt into the virtual machine, receives an indication that the virtual machine has attempted to access the device, and in response to the indication that the virtual machine has attempted to access the device, unmasks the interrupt from the device.