Secure VM TLB Flushing for TEE Memory Updates
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing solutions for managing translation lookaside buffers (TLBs) in computing devices do not effectively ensure memory security for trusted execution environments (TEEs), particularly when secure memories are modified, leading to potential unauthorized access and data breaches.
Innovation Solution
A method involving inter-processor interrupts (IPIs) is used to flush all TLBs when exiting secure virtual machines, accompanied by a tracking module that verifies the completion of TLB flushing to ensure secure memory management, ensuring that all CPU cores running secure virtual machines perform the flushing operation correctly.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If TLB caching is used to speed up address translation, then translation speed is improved, but memory security for TEE is compromised due to potential unauthorized access to secure memory
Solution Approach 1:
The patent extracts and isolates secure memory management from the common TLB caching mechanism by implementing separate TLB flushing control for secure and common virtual machines. When a secure virtual machine exits, its TLB entries are selectively flushed while common virtual machine TLB entries are preserved, thus maintaining security without compromising overall translation performance.
Solution Approach 2:
The patent performs preliminary TLB flushing actions before secure memory modifications or secure virtual machine exits. By proactively clearing TLB entries for secure virtual machines before they can access modified secure memory, the system prevents potential security breaches while maintaining efficient caching for common operations.
2Reliability
If TLB flushing is performed for all virtual machines when secure memory is modified, then memory security is improved, but system performance deteriorates due to unnecessary flushing of common virtual machine TLBs
Solution Approach 1:
The patent segments the TLB management system into distinct control paths for secure and common virtual machines. By maintaining separate tracking of which virtual machines are secure versus common, the system can selectively flush only the necessary TLB entries, avoiding unnecessary flushing of common virtual machine TLBs and thus preserving system performance while ensuring security.
Solution Approach 2:
The patent applies different quality control to different parts of the TLB system based on virtual machine type. Secure virtual machines receive strict TLB flushing control to ensure security, while common virtual machines maintain aggressive caching for performance. This localized quality approach ensures security where needed without sacrificing overall system productivity.
3Reliability
If TLB flushing verification is implemented to ensure security, then memory security is improved, but device complexity increases due to additional tracking and verification mechanisms
Solution Approach 1:
The patent implements a self-service verification mechanism where the system automatically tracks and verifies TLB flushing completion without requiring external intervention. The verification module monitors TLB flush operations and automatically confirms when secure virtual machine TLBs have been properly cleared, reducing the need for complex manual verification procedures while maintaining security.
Solution Approach 2:
The patent creates a universal verification framework that handles both secure and common virtual machine TLB management through a single integrated system. The verification module serves multiple functions: tracking secure VM exits, verifying TLB flush completion, and coordinating with the virtualization layer, thereby reducing overall system complexity through consolidation rather than adding separate specialized mechanisms.
Data Source
AI summary
For managing a translation lookaside buffer (TLB), an example computing device is deployed with virtual machines (VMs) by using a virtual machine monitor and has multiple CPU cores, where the VMs include a common VM running a common execution environment and a secure VM running a trusted execution environment (TEE) instance. In an example, in response to a target request for modifying a secure memory, the common execution environment sends an inter-processor interrupt (IPI) to one or more CPU cores that run the secure VM. Control data corresponding to the secure VM include a TLB control field set to a target value that indicates that all TLBs of the VM are flushed when exiting from the secure VM. In response to the IPI, the one or more CPU cores exit from a secure mode, and flushes all TLBs of the VM based on the target value.


