IP Library Granted Patent US 11,755,731
Granted Patent B2
US 11,755,731 · App. 16/937,392 · Granted Sep 12, 2023

Processor that prevents speculative execution across translation context change boundaries to mitigate side channel attacks

Inventors: John G. Favor (San Francisco, CA); David S. Oliver (Providence, UT)
Assignee: Ventana Micro Systems Inc.
G06F21/556G06F9/30047G06F9/3842G06F9/542G06F12/1027G06F21/54G06F21/72
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 11,755,731
App. No.
16/937,392
Granted
Sep 12, 2023
Kind
B2
Abstract

A processor for mitigating side channel attacks includes units that perform fetch, decode, and execution of instructions and pipeline control logic. The processor performs speculative and out-of-order execution of the instructions. The units detect and notify the control unit of events that cause a change from a first translation context (TC) to a second TC. In response, the pipeline control logic prevents speculative execution of instructions that are dependent in their execution on the change to the second TC until all instructions that are dependent on the first TC have completed execution, which may involve stalling their dispatch until all first-TC-dependent instructions have at least completed execution, or by tagging them and dispatching them to execution schedulers but preventing them from starting execution until all first-TC-dependent instructions have at least completed execution. The processor may also in response prevent speculative instruction fetching and/or perform speculative instruction flushing.

Claims (153)

1. A processor for mitigating side channel attacks,

comprising:

a pipeline of units that fetch, decode, and execute instructions;

pipeline control logic coupled to the units of the pipeline;

wherein the processor is configured to perform speculative execution of the instructions;

wherein the processor is configured to execute the instructions out of program order;

wherein the units detect and notify the pipeline control logic of events that cause a change from a first translation context to a second translation context;

wherein in response to notification of the events, the pipeline control logic prevents speculative execution of instructions that are dependent in their execution on the change to the second translation context until all instructions that are dependent on the first translation context have completed execution; and

wherein speculative execution of an instruction comprises execution of the instruction during a time when at least one instruction older in program order than the instruction has not completed execution such that a possibility exists that execution of the older instruction would result in an abort of the instruction.

2. The processor of claim 1 ,

wherein to prevent the speculative execution, the pipeline control logic stalls dispatch to the execution units until all instructions that are dependent in their execution on the first translation context have at least completed execution.

3. The processor of claim 1 ,

wherein to prevent the speculative execution, the pipeline control logic tags and dispatches the instructions that are dependent in their execution on the change to the second translation context to execution schedulers but prevents the tagged and dispatched instructions from starting execution until all instructions that are dependent in their execution on the first translation context have at least completed execution.

4. The processor of claim 1 ,

wherein in response to detection of the events, the pipeline control logic further prevents speculative execution of instructions that are dependent in their execution on the second translation context until no outstanding data cache misses and/or no instructions associated with outstanding translation lookaside buffer misses are present in the processor.

5. The processor of claim 1 ,

wherein the pipeline control logic is further configured to:

detect that a speculatively executed instruction causes an abort condition;

flush, from the pipeline, instructions newer in program order than the abort-causing instruction; and

continue execution of instructions older in program order than the abort-causing instruction.

6. The processor of claim 1 ,

wherein in response to detection of the events, the pipeline control logic further prevents speculative fetching of instructions until all instructions that are dependent on the first translation context have at least completed execution.

7. A method for mitigating side channel attacks in a processor that performs speculative execution of instructions, executes instructions out of program order, and includes a pipeline of units that fetch, decode, and execute instructions and pipeline control logic coupled to the units of the pipeline, the method comprising:

detecting and notifying, by the units, the pipeline control logic of events that cause a change from a first translation context to a second translation context; and

preventing, by the pipeline control logic in response to notification of the events, speculative execution of instructions that are dependent in their execution on the change to the second translation context until all instructions that are dependent on the first translation context have completed execution;

wherein speculative execution of an instruction comprises execution of the instruction during a time when at least one instruction older in program order than the instruction has not completed execution such that a possibility exists that execution of the older instruction would result in an abort of the instruction.

8. The method of claim 7 ,

wherein said preventing the speculative execution comprises stalling dispatch to the execution units until all instructions that are dependent in their execution on the first translation context have at least completed execution.

9. The method of claim 7 ,

wherein said preventing the speculative execution comprises tagging and dispatching the instructions that are dependent in their execution on the change to the second translation context to execution schedulers but preventing the tagged and dispatched instructions from starting execution until all instructions that are dependent in their execution on the first translation context have at least completed execution.

10. The method of claim 7 ,

wherein further said preventing speculative execution of instructions that are dependent in their execution on the second translation context is performed until no outstanding data cache misses and/or no instructions associated with outstanding translation lookaside buffer misses are present in the processor.

11. The method of claim 7 , further comprising:

detecting, by the pipeline control logic, that a speculatively executed instruction causes an abort condition;

flushing, from the pipeline, instructions newer in program order than the abort-causing instruction; and

continuing execution of instructions older in program order than the abort-causing instruction.

12. The method of claim 7 , further comprising:

preventing, by the pipeline control logic in response to detection of the events, speculative fetching of instructions until all instructions that are dependent on the first translation context have at least completed execution.

13. A non-transitory computer-readable medium having instructions stored thereon that are capable of causing or configuring a processor for mitigating side channel attacks, the processor comprising:

a pipeline of units that fetch, decode, and execute instructions;

pipeline control logic coupled to the units of the pipeline;

wherein the processor is configured to perform speculative execution of the instructions;

wherein the processor is configured to execute the instructions out of program order;

wherein the units detect and notify the pipeline control logic of events that cause a change from a first translation context to a second translation context;

wherein in response to notification of the events, the pipeline control logic prevents speculative execution of instructions that are dependent in their execution on the change to the second translation context until all instructions that are dependent on the first translation context have completed execution; and

wherein speculative execution of an instruction comprises execution of the instruction during a time when at least one instruction older in program order than the instruction has not completed execution such that a possibility exists that execution of the older instruction would result in an abort of the instruction.

14. The non-transitory computer-readable medium of claim 13 ,

wherein to prevent the speculative execution, the pipeline control logic stalls dispatch to the execution units until all instructions that are dependent in their execution on the first translation context have at least completed execution.

15. The non-transitory computer-readable medium of claim 13 ,

wherein to prevent the speculative execution, the pipeline control logic tags and dispatches the instructions that are dependent in their execution on the change to the second translation context to execution schedulers but prevents the tagged and dispatched instructions from starting execution until all instructions that are dependent in their execution on the first translation context have at least completed execution.

16. The non-transitory computer-readable medium of claim 13 ,

wherein in response to detection of the events, the pipeline control logic further prevents speculative execution of instructions that are dependent in their execution on the second translation context until no outstanding data cache misses and/or no instructions associated with outstanding translation lookaside buffer misses are present in the processor.

17. The non-transitory computer-readable medium of claim 13 ,

wherein the pipeline control logic is further configured to:

detect that a speculatively executed instruction causes an abort condition;

flush, from the pipeline, instructions newer in program order than the abort-causing instruction; and

continue execution of instructions older in program order than the abort-causing instruction.

18. The non-transitory computer-readable medium of claim 13 ,

wherein in response to detection of the events, the pipeline control logic further prevents speculative fetching of instructions until all instructions that are dependent on the first translation context have at least completed execution.

19. The processor of claim 1 ,

wherein the translation context is a function of an address space identifier, a virtual machine identifier, and/or a privilege mode of the processor.

20. The method of claim 7 ,

wherein the translation context is a function of an address space identifier, a virtual machine identifier, and/or a privilege mode of the processor.

21. The non-transitory computer-readable medium of claim 13 ,

wherein the translation context is a function of an address space identifier, a virtual machine identifier, and/or a privilege mode of the processor.

22. A processor for mitigating side channel attacks, comprising:

a pipeline of units that fetch, decode, and execute instructions;

pipeline control logic coupled to the units of the pipeline;

wherein the processor is configured to perform speculative execution of the instructions;

wherein the processor is configured to execute the instructions out of program order;

wherein the units detect and notify the pipeline control logic of events that cause a change from a first translation context to a second translation context;

wherein in response to notification of the events, the pipeline control logic prevents speculative execution of instructions that are dependent in their execution on the change to the second translation context until all instructions that are dependent on the first translation context have completed execution; and

wherein to prevent the speculative execution, the pipeline control logic stalls dispatch to the execution units until all instructions that are dependent in their execution on the first translation context have at least completed execution.

23. A processor for mitigating side channel attacks, comprising:

a pipeline of units that fetch, decode, and execute instructions;

pipeline control logic coupled to the units of the pipeline;

wherein the processor is configured to perform speculative execution of the instructions;

wherein the processor is configured to execute the instructions out of program order;

wherein the units detect and notify the pipeline control logic of events that cause a change from a first translation context to a second translation context;

wherein in response to notification of the events, the pipeline control logic prevents speculative execution of instructions that are dependent in their execution on the change to the second translation context until all instructions that are dependent on the first translation context have completed execution; and

wherein to prevent the speculative execution, the pipeline control logic tags and dispatches the instructions that are dependent in their execution on the change to the second translation context to execution schedulers but prevents the tagged and dispatched instructions from starting execution until all instructions that are dependent in their execution on the first translation context have at least completed execution.

24. A processor for mitigating side channel attacks, comprising:

a pipeline of units that fetch, decode, and execute instructions;

pipeline control logic coupled to the units of the pipeline;

wherein the processor is configured to perform speculative execution of the instructions;

wherein the processor is configured to execute the instructions out of program order;

wherein the units detect and notify the pipeline control logic of events that cause a change from a first translation context to a second translation context;

wherein in response to notification of the events, the pipeline control logic prevents speculative execution of instructions that are dependent in their execution on the change to the second translation context until all instructions that are dependent on the first translation context have completed execution; and

wherein in response to detection of the events, the pipeline control logic further prevents speculative execution of instructions that are dependent in their execution on the second translation context until no outstanding data cache misses and/or no instructions associated with outstanding translation lookaside buffer misses are present in the processor.

25. A processor for mitigating side channel attacks, comprising:

a pipeline of units that fetch, decode, and execute instructions;

pipeline control logic coupled to the units of the pipeline,

wherein the processor is configured to perform speculative execution of the instructions;

wherein the processor is configured to execute the instructions out of program order;

wherein the units detect and notify the pipeline control logic of events that cause a change from a first translation context to a second translation context;

wherein in response to notification of the events, the pipeline control logic prevents speculative execution of instructions that are dependent in their execution on the change to the second translation context until all instructions that are dependent on the first translation context have completed execution; and

wherein the pipeline control logic is further configured to:

detect that a speculatively executed instruction causes an abort condition;

flush, from the pipeline, instructions newer in program order than the abort-causing instruction; and

continue execution of instructions older in program order than the abort-causing instruction.

26. A method for mitigating side channel attacks in a processor that performs speculative execution of instructions, executes instructions out of program order, and includes a pipeline of units that fetch, decode, and execute instructions and pipeline control logic coupled to the units of the pipeline, the method comprising:

detecting and notifying, by the units, the pipeline control logic of events that cause a change from a first translation context to a second translation context; and

preventing, by the pipeline control logic in response to notification of the events, speculative execution of instructions that are dependent in their execution on the change to the second translation context until all instructions that are dependent on the first translation context have completed execution;

wherein said preventing the speculative execution comprises stalling dispatch to the execution units until all instructions that are dependent in their execution on the first translation context have at least completed execution.

27. A method for mitigating side channel attacks in a processor that performs speculative execution of instructions, executes instructions out of program order, and includes a pipeline of units that fetch, decode, and execute instructions and pipeline control logic coupled to the units of the pipeline, the method comprising:

detecting and notifying, by the units, the pipeline control logic of events that cause a change from a first translation context to a second translation context; and

preventing, by the pipeline control logic in response to notification of the events, speculative execution of instructions that are dependent in their execution on the change to the second translation context until all instructions that are dependent on the first translation context have completed execution;

wherein said preventing the speculative execution comprises tagging and dispatching the instructions that are dependent in their execution on the change to the second translation context to execution schedulers but preventing the tagged and dispatched instructions from starting execution until all instructions that are dependent in their execution on the first translation context have at least completed execution.

28. A method for mitigating side channel attacks in a processor that performs speculative execution of instructions, executes instructions out of program order, and includes a pipeline of units that fetch, decode, and execute instructions and pipeline control logic coupled to the units of the pipeline, the method comprising:

detecting and notifying, by the units, the pipeline control logic of events that cause a change from a first translation context to a second translation context; and

preventing, by the pipeline control logic in response to notification of the events, speculative execution of instructions that are dependent in their execution on the change to the second translation context until all instructions that are dependent on the first translation context have completed execution;

wherein further said preventing speculative execution of instructions that are dependent in their execution on the second translation context is performed until no outstanding data cache misses and/or no instructions associated with outstanding translation lookaside buffer misses are present in the processor.

29. A method for mitigating side channel attacks in a processor that performs speculative execution of instructions, executes instructions out of program order, and includes a pipeline of units that fetch, decode, and execute instructions and pipeline control logic coupled to the units of the pipeline, the method comprising:

detecting and notifying, by the units, the pipeline control logic of events that cause a change from a first translation context to a second translation context;

preventing, by the pipeline control logic in response to notification of the events, speculative execution of instructions that are dependent in their execution on the change to the second translation context until all instructions that are dependent on the first translation context have completed execution;

detecting, by the pipeline control logic, that a speculatively executed instruction causes an abort condition;

flushing, from the pipeline, instructions newer in program order than the abort-causing instruction; and

continuing execution of instructions older in program order than the abort-causing instruction.

30. A non-transitory computer-readable medium having instructions stored thereon that are capable of causing or configuring a processor for mitigating side channel attacks, the processor comprising:

a pipeline of units that fetch, decode, and execute instructions;

pipeline control logic coupled to the units of the pipeline;

wherein the processor is configured to perform speculative execution of the instructions;

wherein the processor is configured to execute the instructions out of program order;

wherein the units detect and notify the pipeline control logic of events that cause a change from a first translation context to a second translation context;

wherein in response to notification of the events, the pipeline control logic prevents speculative execution of instructions that are dependent in their execution on the change to the second translation context until all instructions that are dependent on the first translation context have completed execution; and

wherein to prevent the speculative execution, the pipeline control logic stalls dispatch to the execution units until all instructions that are dependent in their execution on the first translation context have at least completed execution.

31. A non-transitory computer-readable medium having instructions stored thereon that are capable of causing or configuring a processor for mitigating side channel attacks, the processor comprising:

a pipeline of units that fetch, decode, and execute instructions;

pipeline control logic coupled to the units of the pipeline;

wherein the processor is configured to perform speculative execution of the instructions;

wherein the processor is configured to execute the instructions out of program order;

wherein the units detect and notify the pipeline control logic of events that cause a change from a first translation context to a second translation context;

wherein in response to notification of the events, the pipeline control logic prevents speculative execution of instructions that are dependent in their execution on the change to the second translation context until all instructions that are dependent on the first translation context have completed execution; and

wherein to prevent the speculative execution, the pipeline control logic tags and dispatches the instructions that are dependent in their execution on the change to the second translation context to execution schedulers but prevents the tagged and dispatched instructions from starting execution until all instructions that are dependent in their execution on the first translation context have at least completed execution.

32. A non-transitory computer-readable medium having instructions stored thereon that are capable of causing or configuring a processor for mitigating side channel attacks, the processor comprising:

a pipeline of units that fetch, decode, and execute instructions;

pipeline control logic coupled to the units of the pipeline;

wherein the processor is configured to perform speculative execution of the instructions;

wherein the processor is configured to execute the instructions out of program order;

wherein the units detect and notify the pipeline control logic of events that cause a change from a first translation context to a second translation context;

wherein in response to notification of the events, the pipeline control logic prevents speculative execution of instructions that are dependent in their execution on the change to the second translation context until all instructions that are dependent on the first translation context have completed execution; and

wherein in response to detection of the events, the pipeline control logic further prevents speculative execution of instructions that are dependent in their execution on the second translation context until no outstanding data cache misses and/or no instructions associated with outstanding translation lookaside buffer misses are present in the processor.

33. A non-transitory computer-readable medium having instructions stored thereon that are capable of causing or configuring a processor for mitigating side channel attacks, the processor comprising:

a pipeline of units that fetch, decode, and execute instructions;

pipeline control logic coupled to the units of the pipeline;

wherein the processor is configured to perform speculative execution of the instructions;

wherein the processor is configured to execute the instructions out of program order;

wherein the units detect and notify the pipeline control logic of events that cause a change from a first translation context to a second translation context;

wherein in response to notification of the events, the pipeline control logic prevents speculative execution of instructions that are dependent in their execution on the change to the second translation context until all instructions that are dependent on the first translation context have completed execution; and

wherein the pipeline control logic is further configured to:

detect that a speculatively executed instruction causes an abort condition;

flush, from the pipeline, instructions newer in program order than the abort-causing instruction; and

continue execution of instructions older in program order than the abort-causing instruction.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 23, 2020
From: FAVOR, JOHN G.; OLIVER, DAVID S.
To: VENTANA MICRO SYSTEMS INC.
Reel/Frame 053297/0919 →
Continuity (1)
Related Publication 20220027467A1 · Jan 27, 2022
Cited By (1)
US 12,524,265