Secure VM Interrupt Handling via Shared Work Queue
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing method of handling interrupts in secure virtual machines is time- and power-consuming due to the need for frequent exits to a virtual-machine monitor, which can consume approximately 3,000-4,000 processor cycles.
Innovation Solution
A method that involves creating a work queue in shared memory for interrupts from devices associated with a secure virtual machine, updating a task-priority register to filter interrupts, and using a timer to manage priority levels, allowing the secure virtual machine to poll the work queue without continuous exits to the virtual-machine monitor.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If interrupts are virtualized to exit into the virtual-machine monitor for each interrupt, then security and proper interrupt routing are ensured, but processing overhead and power consumption increase significantly
Solution Approach 1:
The interrupt handling process is segmented into two parts: initial interrupt setup that requires virtual-machine monitor involvement, and subsequent interrupt processing that occurs directly in the secure virtual machine. The work queue mechanism separates the security-critical routing decision (made once by the virtual-machine monitor) from the repetitive interrupt processing (done locally by the secure virtual machine), eliminating repeated exits to the virtual-machine monitor while maintaining security.
Solution Approach 2:
The virtual-machine monitor performs preliminary action by setting up the work queue and configuring the task-priority register before the secure virtual machine begins processing interrupts. This preliminary configuration enables the secure virtual machine to handle subsequent interrupts independently without requiring repeated virtual-machine monitor involvement, thus reducing processing overhead while maintaining security.
2Reliability
If the virtual-machine monitor handles every interrupt, then security is maintained, but power consumption increases due to frequent context switches
Solution Approach 1:
The system segments interrupt handling between the virtual-machine monitor (which handles security-critical setup once) and the secure virtual machine (which handles repetitive processing locally). This segmentation eliminates frequent context switches while maintaining security through the initial configuration of the task-priority register and work queue.
Solution Approach 2:
The secure virtual machine is empowered to service its own interrupts directly by polling the work queue and processing items locally, rather than requiring the virtual-machine monitor to handle each interrupt. This self-service capability dramatically reduces power consumption by eliminating repeated context switches while maintaining security through the pre-configured task-priority register.
3Productivity
If devices are shared between multiple virtual machines, then resource utilization improves, but interrupt handling complexity increases
Solution Approach 1:
The work queue acts as an intermediary between shared devices and the secure virtual machine. Instead of the secure virtual machine directly handling interrupts from shared devices (which would require complex virtualization logic), interrupts are routed to the work queue, which the secure virtual machine polls and processes. This intermediary simplifies interrupt handling while maintaining device sharing.
Solution Approach 2:
The task-priority register is used to dynamically change the interrupt handling parameters of the processor. By setting the task-priority register to filter for secure virtual machine interrupts during polling periods, the system enables the processor to efficiently handle interrupts from shared devices without requiring complex software-based virtualization logic, thus reducing interrupt handling complexity.
Data Source
AI summary
Various embodiments are generally directed to an apparatus, method, and other techniques to handle interrupts directed to secure virtual machines. Work is added to a work queue in a shared memory buffer in accordance with a received request, and a task-priority register is updated to block interrupts not directed toward the secure virtual machine. A timer that expires after a number of cycles of the computer processor have elapsed is started. The secure virtual machine is launched on the computer processor, and a work queue in a shared memory buffer is polled for work to be executed by the secure virtual machine until the work queue is empty or until the timer expires.


