# US 2020/0004959 A1 · Microarchitectural mechanisms for the prevention of side-channel attacks

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2020/0004959 A1
- Document ID: US20200004959A1
- Status: Published application
- Kind: A1
- Application number: 16/456,578
- Filed: 2019-06-28
- Published: 2020-01-02
- Earliest claimed: 2018-06-28
- Assignees: Intel Corporation
- Inventors: Robert S. Chappell; Jared W. STARK, IV; Joseph Nuzman; Stephen Robinson; Jason W. Brandt
- Web page: https://patentgrep.com/patent/US20200004959A1

## CPC

- G06F 21/556: {involving covert channels, i.e. data leakage between processes (inhibiting the analysis of circuitry or operation with measures against power attack G06F21/755)}
- G06F 9/30116: {Shadow registers, e.g. coupled registers, not forming part of the register space}
- G06F 9/30123: {according to context, e.g. thread buffers}
- G06F 9/30196: {using decoder, e.g. decoder per instruction set, adaptable or programmable decoders}
- G06F 9/3806: {using address prediction, e.g. return stack, branch history buffer}
- G06F 9/3808: {for instruction reuse, e.g. trace cache, branch target cache}
- G06F 9/3842: {Speculative instruction execution}
- G06F 9/3844: {using dynamic branch prediction, e.g. using branch history tables}
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 12/0802: Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F 12/0842: for multiprocessing or multitasking
- G06F 12/0875: with dedicated cache, e.g. instruction or stack
- G06F 12/1036: for multiple virtual address spaces, e.g. segmentation (G06F12/1045 takes precedence)
- G06F 21/62: Protecting access to data via a platform, e.g. using keys or access control rules
- H04L 9/003: {for power analysis, e.g. differential power analysis [DPA] or simple power analysis [SPA]}
- G06F 12/0897: with two or more cache hierarchy levels (with multilevel cache hierarchies G06F12/0811)
- G06F 2212/1016: Performance improvement
- G06F 2212/154: Networked environment
- G06F 2212/683: Invalidation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Systems, methods, and apparatuses relating to microarchitectural mechanisms for the prevention of side-channel attacks are disclosed herein. In one embodiment, a processor includes a core having a plurality of physical contexts to execute a plurality of threads, a plurality of structures shared by the plurality of threads, a context mapping structure to map context signatures to respective physical contexts of the plurality of physical contexts, each physical context to identify and differentiate state of the plurality of structures, and a context manager circuit to, when one or more of a plurality of fields that comprise a context signature is changed, search the context mapping structure for a match to another context signature, and when the match is found, a physical context associated with the match is set as an active physical context for the core.

## Claims

### Claim 1

A processor comprising:
a core having a plurality of physical contexts to execute a plurality of threads;
a plurality of structures shared by the plurality of threads;
a context mapping structure to map context signatures to respective physical contexts of the plurality of physical contexts, each physical context to identify and differentiate state of the plurality of structures; and
a context manager circuit to, when one or more of a plurality of fields that comprise a context signature is changed, search the context mapping structure for a match to another context signature, and when the match is found, a physical context associated with the match is set as an active physical context for the core.

### Claim 2 (depends on 1)

The processor of claim 1, wherein, when there is no match, the context manager circuit is to allocate a physical context for the plurality of fields forming a new context signature.

### Claim 3 (depends on 1)

The processor of claim 1, wherein the plurality of structures comprises a prediction structure, a caching structure, a renaming structure, and a buffering structure between components in a pipeline of the core.

### Claim 4 (depends on 1)

The processor of claim 1, wherein the processor comprises a decoder to decode a single instruction into a decoded single instruction, and an execution unit to execute the decoded single instruction to cause the context manager circuit to switch the active physical context when none of the plurality of fields that comprise the context signature are changed.

### Claim 5 (depends on 1)

The processor of claim 1, wherein the context mapping structure is saved when a first power command is received by the context manager circuit and restored when a second power command is received by the context manager circuit.

### Claim 6 (depends on 1)

The processor of claim 1, wherein the context manager circuit comprises an active context identification generator circuit to generate an active context identification value from the context signature and an active bit.

### Claim 7 (depends on 6)

The processor of claim 6, wherein the context manager circuit uses the active context identification value as an index into a table storing the plurality of physical contexts.

### Claim 8 (depends on 6)

The processor of claim 6, wherein the context manager circuit uses the active context identification value as an index into a table storing encrypted keys for the plurality of physical contexts.

### Claim 9

A method comprising:
executing a plurality of threads on a core of a processor having a plurality of physical contexts;
sharing a plurality of structures of the processor by the plurality of threads;
mapping context signatures to respective physical contexts of the plurality of physical contexts in a context mapping structure of the processor, each physical context identifying and differentiating state of the plurality of structures;
searching, when one or more of a plurality of fields that comprise a context signature is changed by software executing on the processor, the context mapping structure for a match to another context signature; and
setting, when the match is found, a physical context associated with the match as an active physical context for the core.

### Claim 10 (depends on 9)

The method of claim 9, wherein, when there is no match, allocating a physical context for the plurality of fields forming a new context signature.

### Claim 11 (depends on 9)

The method of claim 9, wherein the plurality of structures comprises a prediction structure, a caching structure, a renaming structure, and a buffering structure between components in a pipeline of the core.

### Claim 12 (depends on 9)

The method of claim 9, further comprising:
decoding a single instruction into a decoded single instruction with a decoder of the processor; and
executing the decoded single instruction with an execution unit of the processor to switch the active physical context when none of the plurality of fields that comprise the context signature are changed.

### Claim 13 (depends on 9)

The method of claim 9, further comprising saving the context mapping structure when a first power command is received and restoring the context mapping structure when a second power command is received.

### Claim 14 (depends on 9)

The method of claim 9, further comprising generating an active context identification value from the context signature and an active bit.

### Claim 15 (depends on 14)

The method of claim 14, further comprising using the active context identification value as an index into a table storing the plurality of physical contexts.

### Claim 16 (depends on 14)

The method of claim 14, further comprising using the active context identification value as an index into a table storing encrypted keys for the plurality of physical contexts.

### Claim 17

A non-transitory machine readable medium that stores code that when executed by a machine causes the machine to perform a method comprising:
executing a plurality of threads on a core of a processor having a plurality of physical contexts;
sharing a plurality of structures of the processor by the plurality of threads;
mapping context signatures to respective physical contexts of the plurality of physical contexts in a context mapping structure of the processor, each physical context identifying and differentiating state of the plurality of structures;
searching, when one or more of a plurality of fields that comprise a context signature is changed by software executing on the processor, the context mapping structure for a match to another context signature; and
setting, when the match is found, a physical context associated with the match as an active physical context for the core.

### Claim 18 (depends on 17)

The non-transitory machine readable medium of claim 17, wherein, when there is no match, allocating a physical context for the plurality of fields forming a new context signature.

### Claim 19 (depends on 17)

The non-transitory machine readable medium of claim 17, wherein the plurality of structures comprises a prediction structure, a caching structure, a renaming structure, and a buffering structure between components in a pipeline of the core.

### Claim 20 (depends on 17)

The non-transitory machine readable medium of claim 17, further comprising:
decoding a single instruction into a decoded single instruction with a decoder of the processor; and
executing the decoded single instruction with an execution unit of the processor to switch the active physical context when none of the plurality of fields that comprise the context signature are changed.

### Claim 21 (depends on 17)

The non-transitory machine readable medium of claim 17, further comprising saving the context mapping structure when a first power command is received and restoring the context mapping structure when a second power command is received.

### Claim 22 (depends on 17)

The non-transitory machine readable medium of claim 17, further comprising generating an active context identification value from the context signature and an active bit.

### Claim 23 (depends on 22)

The non-transitory machine readable medium of claim 22, further comprising using the active context identification value as an index into a table storing the plurality of physical contexts.

### Claim 24 (depends on 22)

The non-transitory machine readable medium of claim 22, further comprising using the active context identification value as an index into a table storing encrypted keys for the plurality of physical contexts.
