TEE Scheduling Context Switching Across Virtual Machines
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing systems lack a mechanism for a Trusted Execution Environment (TEE) to initiate calls to virtual machines (VMs) other than the primary VM, limiting the flexibility and efficiency of service requests across different execution environments.
Innovation Solution
Implementing a virtual machine bound scheduling that allows a first object associated with a first VM to call a second object registered with a TEE, switching the scheduling context to the second VM for executing code, enabling context switching between VMs.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If the TEE operates within a single primary VM scheduling context, then the system maintains simple VM management and clear privilege boundaries, but the TEE cannot initiate calls to other VMs, reducing system flexibility and service request efficiency
Solution Approach 1:
The TEE is enhanced with multi-functionality to operate across multiple VM scheduling contexts. The TEE can now initiate calls to any VM in the system, not just the primary VM, by implementing a callback mechanism that allows it to switch scheduling contexts dynamically. This makes the TEE universal in its ability to interact with any VM while maintaining its core security functions.
Solution Approach 2:
A callback mechanism serves as an intermediary between the TEE and multiple VMs. When the TEE needs to call a service in a different VM, it uses this callback mechanism to switch to that VM's scheduling context, execute the necessary code, and then return. This intermediary mechanism enables cross-VM communication without requiring complex direct connections between all VM pairs.
2Productivity
If the TEE is restricted to the primary VM's scheduling context, then the privilege level management remains simple with clear exception level boundaries, but service requests across different VMs become inefficient and require workarounds
Solution Approach 1:
The TEE's scheduling context is made dynamic rather than static. Instead of being permanently bound to the primary VM's scheduling context, the TEE can dynamically switch to any VM's scheduling context when needed. This is achieved through the callback mechanism that allows the TEE to change its execution context based on the service request requirements, improving productivity without permanently complicating privilege management.
Solution Approach 2:
The scheduling context parameter of the TEE is changed dynamically during operation. The TEE can modify its current scheduling context to match the target VM's context when initiating a call, and then restore the original context after the call completes. This parameter change approach allows efficient cross-VM service requests while maintaining clear privilege boundaries through proper context restoration.
3Adaptability or versatility
If exception level transitions are only allowed during exception handling, then the privilege level architecture remains simple and predictable, but the TEE cannot efficiently switch between different VM contexts for service execution
Solution Approach 1:
The system performs preliminary actions by saving the current scheduling context and privilege level state before the TEE switches to a different VM's context. This preliminary state preservation ensures that when the TEE completes its service execution in the target VM, it can reliably return to its original context. This approach enables context switching capability while maintaining reliability through proper state management.
Solution Approach 2:
The callback mechanism implements a feedback loop that monitors and manages the TEE's scheduling context transitions. When the TEE switches to a different VM's context to execute a service, the callback mechanism tracks this transition and ensures proper restoration afterward. This feedback mechanism enables adaptability in context switching while maintaining reliability through continuous state verification and restoration.
Data Source
AI summary
Systems and techniques are provided for accessing execution environments. For instance, a process can include calling, by a first object, a second object, wherein the first object is associated with a first virtual machine (VM) of a plurality of VMs, wherein the first object is executing in a scheduling context of the first VM, wherein the second object is registered with a trusted execution environment (TEE), and wherein the second object is associated with a second VM of the plurality of VMs; receiving, by the second object, a call from the first object; switching the scheduling context to the scheduling context of the second VM based on the received call from the first object; and executing code associated with the second object in the scheduling context of the second VM.


