Protected Execution Context With Selective Save and Lazy Restore
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The process of saving and restoring context in processors is power-consuming and time-intensive, especially when dealing with large amounts of context and frequent switches between threads, particularly in protected execution environments where unauthorized access must be prevented.
Innovation Solution
Implementing a context save and restore unit with selective save, sanitize, and lazy restore mechanisms, utilizing context metadata to determine which context elements have been modified or accessed, and only saving, sanitizing, or restoring those elements as needed, thereby reducing unnecessary operations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If all context elements are saved and restored during thread switching, then thread context integrity is maintained, but power consumption and time increase significantly
Solution Approach 1:
The context is divided into multiple elements (e.g., general-purpose registers, vector registers, control registers), and the patent applies selective saving and restoring based on whether each element was modified during the protected execution environment. This segmentation allows the system to save only necessary context elements, reducing power consumption while maintaining integrity of modified elements.
Solution Approach 2:
Instead of saving all context elements unconditionally, the patent implements partial saving by using metadata to track which context elements were actually modified or accessed during protected execution. Only those partial elements are saved and restored, avoiding the excessive action of saving everything, thus reducing power consumption and time.
2Reliability
If all context elements are saved and restored during thread switching, then thread context integrity is maintained, but the time required for context switching increases
Solution Approach 1:
The context is divided into multiple elements (e.g., general-purpose registers, vector registers, control registers), and the patent applies selective saving and restoring based on whether each element was modified during the protected execution environment. This segmentation allows the system to save only necessary context elements, reducing power consumption while maintaining integrity of modified elements.
Solution Approach 2:
Instead of saving all context elements unconditionally, the patent implements partial saving by using metadata to track which context elements were actually modified or accessed during protected execution. Only those partial elements are saved and restored, avoiding the excessive action of saving everything, thus reducing power consumption and time.
3Use of energy by moving object
If context elements are selectively saved and restored based on metadata, then power consumption and time are reduced, but system complexity increases
Solution Approach 1:
The metadata structure is established and maintained during the protected execution environment entry, preliminarily tracking which context elements will need to be saved. This preliminary action allows the selective save/restore mechanism to operate efficiently without requiring complex real-time decisions, thus managing system complexity while achieving power and time savings.
Solution Approach 2:
The metadata mechanism automatically tracks and manages which context elements were modified during protected execution, allowing the system to self-determine what needs to be saved and restored. This self-service approach reduces the need for external control logic and manual management, thereby controlling system complexity while achieving selective context handling.
Data Source
AI summary
An apparatus of an aspect includes a context storage to store context of a logical processor, and an execution unit coupled with the context storage. The execution unit to perform operations corresponding to a control primitive or an exceptional condition. The operations including to selectively save a first subset of the context, from a first subset of the context storage written to after entrance into a protected execution environment, to system memory, and cause the logical processor to exit the protected execution environment. Other apparatus, methods, systems, and instructions are disclosed.


