IP Library Granted Patent US 9,898,330
Granted Patent B2
US 9,898,330 · App. 14/076,341 · Granted Feb 20, 2018

Compacted context state management

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,898,330
App. No.
14/076,341
Granted
Feb 20, 2018
Kind
B2
Abstract

Embodiments of an invention related to compacted context state management are disclosed. In one embodiment, a processor includes instruction hardware and state management logic. The instruction hardware is to receive a first save instruction and a second save instruction. The state management logic is to, in response to the first save instruction, save context state in an un-compacted format in a first save area. The state management logic is also to, in response to the second save instruction, save a compaction mask and context state in a compacted format in a second save area and set a compacted-save indicator in the second save area. The state management logic is also to, in response to a single restore instruction, determine, based on the compacted-save indicator, whether to restore context from the un-compacted format in the first save area or from the compacted format in the second save area.

Claims (48)

1. A processor comprising:

instruction hardware to receive a first save instruction and a second save instruction; and

state management logic to:

in response to the first save instruction, save context state of features supported by the processor in an un-compacted format in a first save area having a constant size according to a predefined save area layout map having a plurality of fixed offsets, each corresponding to a particular processor feature of the processor features supported by the processor, and clear a compacted-save bit in the first save area,

in response to the second save instruction, save a compaction mask and the context state of a subset of processor features supported by the processor in a compacted format in a second save area having a variable size according to the compaction mask to provide for a plurality of variable offsets per feature and set a compacted-save bit in the second save area, and

in response to a single restore instruction specifying a save area, read a compacted-save bit from the save area to determine whether the save area is an un-compacted save area saved in an un-compacted format or a compacted save area saved in a compacted format,

in response to determination that the compacted-save bit is set, read the compaction mask from the save area in order to determine which subset of processor features are to be restored and restore the context state of each processor feature of the subset of processor features indicated by the compaction mask.

2. The processor of claim 1 , wherein the compaction mask is to indicate the subset of processor features, where the context state is to be saved only for the subset.

3. The processor of claim 2 , wherein the compacted format is to include the context state for the subset without gaps for features having unsaved context state.

4. The processor of claim 3 , wherein the state management logic is also to include a bitwise AND gate to combine the compaction mask with a feature-enabled mask, where an output of the bitwise AND gate is to be used to determine the subset.

5. The processor of claim 4 , wherein the instruction hardware is also to receive a first state management instruction to set the feature-enabled mask.

6. The processor of claim 5 , wherein the instruction hardware is also to receive a second state management instruction to read the feature-enabled mask.

7. The processor of claim 6 , wherein the second state management instruction is to have a leaf instruction to read a feature-in-use mask.

8. The processor of claim 2 , wherein the state management logic is also, in response to the single restore instruction when the compacted-save bit is set, read the compaction mask from the compacted format in the second save area to determine which processor features to restore.

9. The processor of claim 8 , wherein the state management logic is also, in response to the single restore instruction when the compacted-save bit is set, restore the context state only from the compacted format in the second save area for the features indicated by the compaction mask.

10. The processor of claim 9 , wherein the state management logic is also, in response to the single restore instruction when the compacted-save bit is set, initialize the context state for features outside the subset.

11. A method comprising:

receiving, by a processor, a first save instruction;

saving, by the processor in response to the first save instruction, context state of features supported by the processor in an un-compacted format in a first save area having a constant size according to a predefined save area layout map having a plurality of fixed offsets, each corresponding to a particular processor feature of the processor features supported by the processor,

clearing a compacted-save bit in the first save area,

receiving, by the processor a second save instruction;

saving, by the processor in response to the second save instruction, a compaction mask in a second save area having a variable size according to the compaction mask to provide for a plurality of variable offsets per feature;

saving, by the processor in response to the second save instruction, the context state of a subset of processor features supported by the processor, in a compacted format in the second save area;

setting, by the processor in response to the second save instruction, a compacted-save bit in the second save area;

reading, in response to a single restore instruction specifying a save area, a compacted-save bit from the save area to determine whether the save area is an un-compacted save area saved in an un-compacted format or a compacted save area saved in a compacted format, and

in response to determination that the compacted-save bit is set, reading the compaction mask from the save area in order to determine which subset of processor features are to be restored and restoring the context state of each processor feature of the subset of processor features indicated by the compaction mask.

12. The method of claim 11 , wherein the compaction mask is to indicate the subset of processor features, where the context state is to be saved only for the subset.

13. The method of claim 12 , wherein the compacted format is to include the context state for the subset without gaps for features having unsaved context state.

14. The method of claim 13 , further comprising combining the compaction mask with a feature-enabled mask to determine the subset.

15. The method of claim 14 , further comprising receiving a first state management instruction to set the feature-enabled mask.

16. The method of claim 15 , further comprising receiving a second state management instruction to read the feature-enabled mask.

17. The method of claim 16 , further comprising, in response to the single restore instruction when the compacted-save bit is set:

reading the compaction mask from the compacted format in the second save area to determine which processor features to restore; and

restoring the context state only from the compacted format in the second save area for the features indicated by the compaction mask.

18. The method of claim 16 , wherein the second state management instruction is to have a leaf instruction to read a feature-in-use mask, the method further comprising:

reading, in response to the leaf instruction, the feature-in-use mask; and

saving, in response to the second save instruction with a compaction mask based on the feature in-use-mask, only in-use features.

19. The method of claim 18 , further comprising:

restoring, in response to the single restore instruction when the compacted-save bit is set, initializing the context state for features outside the subset.

20. A system comprising:

a memory; and

a processor including:

instruction hardware to receive a first save instruction and a second save instruction, and

state management logic to:

in response to the first save instruction, save context state of features supported by the processor in an un-compacted format in a first save area having a constant size according to a predefined save area layout map having a plurality of fixed offsets, each corresponding to a particular processor feature of the processor features supported by the processor, and clear a compacted-save bit in the first save area,

in response to the second save instruction, save a compaction mask and the context state of a subset of processor features supported by the processor in a compacted format in a second save area having a variable size according to the compaction mask to provide for a plurality of variable offsets per feature and set a compacted-save bit in the second save area, and

in response to a single restore instruction specifying a save area, read a compacted-save bit from the save area to determine whether the save area is an un-compacted save area saved in an un-compacted format or a compacted save area saved in a compacted format,

in response to determination that the compacted-save bit is set, read the compaction mask from the save area in order to determine which subset of processor features are to be restored and restore the context state of each processor feature of the subset of processor features indicated by the compaction mask.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 15, 2022
From: INTEL CORPORATION
To: TAHOE RESEARCH, LTD.
Reel/Frame 061175/0176 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 1, 2015
From: KHARE, ATUL; PUTHIYEDATH, LEENA; MALLICK, ASIT; COKE, JIM; MISHAELI, MICHAEL; NEIGER, GILBERT; SANJEEPAN, VIVEKANANTHAN; BRANDT, JASON
To: INTEL CORPORATION
Reel/Frame 035959/0536 →